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


Hallo Paul-Kenji,

Am Samstag, 10. Januar 2004 um 05:19 schriebst du:

[...]

> Most libs were compiled this way:

> gcc -g -Wall -ansi -pedantic -Wwrite-strings -Wshadow
> -Waggregate-return -I. -I/home/calendar/include -I. -I/usr/include
> -I/usr/include/ncurses -I/usr/local/include -c output.c         -o
> ../liboxhtml.so
> gcc -g -shared -o ../liboxhtml.so.dll -Wl,--export-all-symbols
> -Wl,--enable-auto-import -Wl,--whole-archive ../liboxhtml.so
> -Wl,--no-whole-archive -L/home/calendar/lib -L/usr/lib -lintl
> -lncurses
> cp liboxhtml.h /home/calendar/include
> cp ../liboxhtml.so.dll ../liboxhtml.so (i added this line later to
> check it wasnt a prob with filenames but it wasnt)


Ok, so why don't you use the suffixes as I quoted them in my last mail
(import-libs: *.dll.a, shared libs: *.dll)

gcc -shared -o cygName.dll -Wl,--out-implib=libName.dll.a \
    -Wl,--export-all-symbols -Wl,--enable-auto-import \
    -Wl,--whole-archive libName.a  \
    -Wl,--no-whole-archive -L/libpath [...other libs...]

where you may also use a list of object files instead of archived
object files after -Wl,--whole-archive.

The linker looks for:
1. libName.dll.a
2. libName.a
3. cygName.dll
(in this order) when you write -lName on the link line.


HTH,
Gerrit
-- 
=^..^=



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