On Sun, 8 Aug 1999, Yoav Ben-Yosef wrote:

> I'm trying for the first time to compile a program which uses ncurses (a 
> "Hello World!" progie compiled and runs fine :), but all ncurses functions 
> aren't identified by the linker. It seems I'm not pointing at the right 
> direction for the ncurses library files. Can anyone give me a tip?

you should send the link comand you were trying to use. here is what works
on this redhat 4.2 system:

g++ -g -o win {a bunch of .o files} -lncurses -ltermcap

note: i'm using g++, gcc will work the same for your C program.
note2: the '-g' flag is for debug info. the '-o win' flag is to make the
resulting exectuable be named 'win'.
note3: i assume your ncurses came with your system, and thus is installed
in a directory that by default is being looked for by your compiled (e.g.
/lib, /usr/lib and so on). if it does not work, you should search for
ncurses on your system:

find / -name 'libncurses.*' -ls

and then add the directory in which the library is found to the link
command, like this:

gcc .... -L/path/to/where/the/ncurses/lib/is/found -lncurses -ltermcap

if this still does not work, please send me your exact full link command,
and the exact error mesasges you get (if there are plenty - compress the
log before sending it), and i'll see if i could hepl.

hope this helps,
guy


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to