This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ncurses prob


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]