This is the mail archive of the cygwin@sources.redhat.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: libtool




Robert Collins wrote:

> gcc -shared -g -O2 -Wall,--enable-auto-image-base,--out-imp-lib=.libs/libnam
> e.dll.a -o .libs/libname.dll -export-dynamic a.lo b.lo c.lo

I think this should be:

gcc -shared -g -O2 -Wall -Wl,--enable-auto-image-base
-Wl,--out-implib=.lib/libname.dll.a -Wl,--export-all-symbols -o
./libs/libname.dll a.lo b.lo c.lo

That is, '-Wl,--out-implib=' not '-Wl,--out-imp-lib'
'-Wl,--export-all-symbols' not '-export-dynamic'

This second one is why you had no exports -- the linker never saw the
'--export-dynamic' command because gcc ate and ignored it (plus, even if
the linker saw '--export-dynamic' it would ignore it, too, because it's
the wrong command).

> 
> built a dll quite happily from standard sources except there were no
> exports...


> 
> 2) the .def files format was broken
> -> I haven't looked at this yet

If you want ld to write the <in-memory, auto-generated> def-file to
disk, then you need '-Wl,--output-def=.libs/libname.def'

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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