#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    29
    Rep Power
    0

    Problems linking curses library


    when I compile the program, I get this:

    # 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


    TI 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. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Posts
    5,888
    Rep Power
    509
    untested guess, my untested solutions are typically wrong:

    change your make command to
    Code:
    LOADLIBES=-lcurses make -f /comp/bin/proc.mk build INAME=pump.pc EXE=/var/tmp/pump_temp2 OBJS=pump.o
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2015
    Posts
    4
    Rep Power
    0
    See if
    Code:
    -lncurses
    at the end of your command, works for you.
  6. #4
  7. No Profile Picture

    Join Date
    Aug 2015
    Location
    New York
    Posts
    18
    Rep Power
    0
    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?
    PHP Code:
       Add "-lcurses" somehow/somewhere

IMN logo majestic logo threadwatch logo seochat tools logo