This is the mail archive of the cygwin 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 problems


Lange, Jeff wrote:

> I'm trying to compile one of my programs in cygwin that uses ncurses and the ncurses panel library.  The only problem is that when I execute the following command:
> 
> ***
> gcc -O2 -Wall -static -lncurses -lpanel main.o prefs.o comm.o usr/lib/libncurses.a /usr/lib/libpanel.a -o m2emu
> ***
[snip]

Change the order on that command, libraries come last and dependent libraries
should be called in order:

gcc -O2 -Wall -static -o m2emu main.o prefs.o comm.o /usr/lib/libpanel.a \
 usr/lib/libncurses.a

You don't need "-lpanel -lncurses" if you are including the whole library in
your command.  If you want better output don't include the static libraries, add
the -l part and let the linker pick and choose what is needed.
-- 
René Berber


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