Mail Archives: cygwin/2000/09/07/20:56:50
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 AT sourceware DOT cygnus DOT com
- Raw text -