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]

Re: problem with linking with NCurses library


Please keep discussion on the list.


> I tried:
> 
> gcc -lncurses <DEFANGED_object files> -o project
> 
> and:
> 
> gcc -lcurses <DEFANGED_object files> -o project
> 
> because this is what I had in the makefile under Linux.


You need to have -lncurses FOLLOW the object files, not PRECEDE them.

> 
> It does not matter to me at this point whether the library is linked
> staticaly or dynamicaly, the cygwin install I have includes the following
> libraries:
> 
> libcurses.a
> libcurses.dll.a
> libncurses++.a
> libncurses++.dll.a
> 
> I suppose the dll libraries are for dynamic linking as in Win32.
> 
> How should I tell the linker to use the dynamic libraries?


It uses them by default.  You only have trouble when you try to link 
staticly. (I'm not giving more detail here, because anything I say about 
static/dynamic will be obsolete in about a week -- changes are a'comin'.)


--Chuck




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]