This is the mail archive of the 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 ../


> 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.

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.


Unsubscribe info:
Problem reports:

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