Mail Archives: cygwin/2004/01/09/05:49:56
Paul-Kenji wrote:
> Hello all,
> i know it might be my fault but i'm trying to compile a prog with
> ncurses under cygwin and here is what i gets:
> (it compiles well, exept at link time)
> make[2]: Entering directory
> `/cygdrive/d/Data/calendar/lib/liboncurses'
> gcc -g -Wall -ansi -pedantic -Wwrite-strings -Wshadow
> -Waggregate-return -I. -I/cygdrive/d/Data/calendar/include
> -I/usr/include/ncurses -I/usr/local/include -L/usr/local/lib -shared
> -fPIC output.c -o ../liboncurses.so
[...]
> anyone knows what's going on?
You need to link against the libraries containing all the symbols you're
using, this is Windows, no undefined references allowded here.
Try:
gcc -g -Wall -ansi -pedantic -Wwrite-strings -Wshadow
-Waggregate-return -I. -I/cygdrive/d/Data/calendar/include
-I/usr/include/ncurses -I/usr/local/include
-c output.c -o oncurses.o
gcc -g -shared -o ../cygoncurses.dll \
-Wl,--out-implib=liboncurses.dll.a \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive \
oncurses.o \
-Wl,--no-whole-archive -L/usr/lib -lintl -lncurses
And probably some more libs missing at your link line.
HTH,
Gerrit
--
=^..^= http://nyckelpiga.de/donate.html
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -