Operating System - HP-UX
1751945 Members
4896 Online
108783 Solutions
New Discussion

Problem linking curses library during compilation

 
dictum9
Super Advisor

Problem linking curses library during compilation


when I compile the C program, I get this. There seems to be a problem with the makefile, it does not reference the right library, how I can fix it?

 

 

# make -f /comp/bin/proc.mk build INAME=pump.pc EXE=/var/tmp/pump_temp2 OBJS=pump.o #08/11/15 1:30PM#
cc -o /var/tmp/pump_temp2 pump.o -L/lib/hpux64 -L/oracle/app/product/fmw11g/forms/lib/ -lclntsh `cat /oracle/app/product/fmw11g/fo
rms/lib/ldflags` `cat /oracle/app/product/fmw11g/forms/lib/sysliblist` -lelf -lm -lrt
ld: Unsatisfied symbol "mvwprintw" in file pump.o
ld: Unsatisfied symbol "initscr" in file pump.o
ld: Unsatisfied symbol "endwin" in file pump.o
ld: Unsatisfied symbol "wgetstr" in file pump.o
ld: Unsatisfied symbol "wnoutrefresh" in file pump.o
ld: Unsatisfied symbol "mvprintw" in file pump.o
ld: Unsatisfied symbol "wrefresh" in file pump.o
ld: Unsatisfied symbol "noecho" in file pump.o
ld: Unsatisfied symbol "wmove" in file pump.o
ld: Unsatisfied symbol "echo" in file pump.o
ld: Unsatisfied symbol "stdscr" in file pump.o
ld: Unsatisfied symbol "mvaddstr" in file pump.o
ld: Unsatisfied symbol "waddch" in file pump.o


when I run it, I get this:

/usr/lib/hpux64/dld.so: Unsatisfied data symbol 'stdscr' in load module '/var/tmp/pump_temp2'.
zsh: killed /var/tmp/pum*temp*


# ldd /var/tmp/pump_temp2 #08/11/15 2:05PM#

libclntsh.so.11.1 => /oracle/app/product/fmw11g/forms/lib/libclntsh.so.11.1
libdl.so.1 => /lib/hpux64/libdl.so.1
libm.so.1 => /lib/hpux64/libm.so.1
libpthread.so.1 => /lib/hpux64/libpthread.so.1
libnsl.so.1 => /lib/hpux64/libnsl.so.1
libunwind.so.1 => /lib/hpux64/libunwind.so.1
libelf.so.1 => /lib/hpux64/libelf.so.1
librt.so.1 => /lib/hpux64/librt.so.1
libc.so.1 => /lib/hpux64/libc.so.1
libnnz11.so => /oracle/app/product/fmw11g/forms/lib/libnnz11.so
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
libm.so.1 => /usr/lib/hpux64/libm.so.1
libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1
libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1
libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
libc.so.1 => /usr/lib/hpux64/libc.so.1
libxti.so.1 => /usr/lib/hpux64/libxti.so.1
libuca.so.1 => /usr/lib/hpux64/libuca.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1


I see it as a problem linking the curses library. This is all on HP-UX 11.31, with ncurses 5.9 installed. Using the native CC compiler.

How can I fix this?

 

2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Problem linking curses library during compilation

> [...] There seems to be a problem with the makefile, it does not
> reference the right library, how I can fix it?

   Owing to my weak psychic powers and your problem description, only
one of us can see your makefile.  Or any of your "the C program".  Or
how you configured the builders before you said "make".  So I know
nothing, but...

> I see it as a problem linking the curses library. This is all on HP-UX
> 11.31, with ncurses 5.9 installed. Using the native CC compiler.

   I don't see anything like "-lcurses" in your transcript.  You can
have all the software in the world "installed", but if you don't tell
the linker to use it, it may not matter if it's "installed" or not.

> How can I fix this?

   Add "-lcurses" somehow/somewhere?

Dennis Handly
Acclaimed Contributor

Re: Problem linking curses library

>when I compile the C program, I get this. There seems to be a problem with the makefile,

 

As Steven says, you need to add a -lcurses to your link line if you want libcurses.

 

>when I run it, I get this:

 

Not much use in running it, if you have link time unsats, unless you don't call those functions.