Mail Archives: cygwin/2002/01/11/08:41:39
Hallo Cygwinners,
I'm trying to link a library with gcc -shared plus some ld options:
gcc -shared -o Zlib.dll -Wl,--out-implib=libZlib.dll.a -Wl,--output-def libZlib.def -Wl,--export-all-symbols -Wl,--enable-auto-import \
-L/usr/local/lib Zlib.o /usr/local/lib/perl5/5.7.2/cygwin-multi-64int/CORE/libperl.dll.a -L/usr/local/lib -lz
gcc: libZlib.def: No such file or directory
Now I'm getting this error.
I thought -Wl,--output-def name.def is the option to tell ld that it
should create this .def file, now I'm confused, why does it tell me
No such file or directory?
From the ld --help output:
...
--out-implib <file> Generate import library
--output-def <file> Generate a .DEF file for the built DLL
...
And the .info says:
`--output-def FILE'
The linker will create the file FILE which will contain a DEF file
corresponding to the DLL the linker is generating. This DEF file
(which should be called `*.def') may be used to create an import
library with `dlltool' or may be used as a reference to
automatically or implicitly exported symbols.
It works well if I skip this flag.
It works well if I do a:
$ touch libZlib.def
before running gcc -shared.
Is this the expected way?
Do I have to create an empty .def file before linking?
Or is something with my setup broken?
Do I need .def files?
Gerrit
--
=^..^=
--
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/
- Raw text -