[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcdio-devel] -lcurses and keypad()
From: |
Steven M. Schultz |
Subject: |
[Libcdio-devel] -lcurses and keypad() |
Date: |
Wed, 9 Mar 2005 16:06:57 -0800 (PST) |
Hi -
On a SuSE 9.2 system I first encountered:
gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations
-Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -o
.libs/cdda-player cdda-player.o cddb.o ../lib/driver/.libs/libcdio.so
-L/usr/local/lib /usr/local/lib/libcddb.so -lcurses -lm
/usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld:
cannot find -lcurses
collect2: ld returned 1 exit status
gmake[3]: *** [cdda-player] Error 1
That's because 'libcurses.so.1' did exist but NOT a plain libcurses.so
So thinking it was just a case of a missing symlink I created a
libcurses.so -> libcurses.so.1
Then the error becomes:
gmake[3]: Entering directory `/usr/local/src/libcdio-cvs/src'
/bin/sh ../libtool --mode=link --tag=CC gcc -g -O2 -Wall -Wchar-subscripts
-Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith
-Wwrite-strings -Wnested-externs -Wno-sign-compare -o cdda-player
cdda-player.o cddb.o ../lib/driver/libcdio.la -L/usr/local/lib -lcddb
-lcurses -lm
gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations
-Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -o
.libs/cdda-player cdda-player.o cddb.o ../lib/driver/.libs/libcdio.so
-L/usr/local/lib /usr/local/lib/libcddb.so -lcurses -lm
cdda-player.o(.text+0x19fc): In function `main':
/usr/local/src/libcdio-cvs/src/cdda-player.c:195: undefined reference to
`keypad'
collect2: ld returned 1 exit status
gmake[3]: *** [cdda-player] Error 1
On modern systems 'curses' (libcurses) has been replaced with 'ncurses'
as in -lncurses. keypad() is only defined in libncurses.
Changing the link command above to use '-lncurses' worked - the link
completed successfully.
So I think the test needs to be for 'ncurses' rather than 'curses'
somewhere.
Cheers,
Steven Schultz
- [Libcdio-devel] -lcurses and keypad(),
Steven M. Schultz <=