This is the mail archive of the
mailing list for the Cygwin project.
Re: Specifying a .def file for use with libtools libraries
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- To: Stephano Mariani <sk dot mail at btinternet dot com>
- Cc: cygwin at cygwin dot com, libtool at gnu dot org
- Date: Mon, 18 Feb 2002 15:11:35 -0500
- Subject: Re: Specifying a .def file for use with libtools libraries
- References: <007601c1b8b3$292127a0$01000001@sknet01>
You do know that there are TWO (or more) different versions of libtool
in the cygwin distribution, right? One is based on libtool-1.4.2 and
uses dlltool to generate the DLL.
The other is based on libtool-cvs(2002-02-02) and uses gcc/ld directly
to build the DLLs. (Note that there are TWO commands to generate DLLs:
"archive_cmds" and "archive_expsym_cmds". Which one is used depends on
a bunch of stuff).
Finally, there's whatever version of libtool was used in the package you
are working on: most libtoolized packages ship with a ltmain.sh file
If you didn't explicitly re-libtoolize the package, then you are using
whatever version of libtool the upstream maintainer used. If you DID
explicitly relibtoolize, then you are EITHER using 1.4.2 or 2002-02-02,
depending on what the wrapper script detects from your configure.in/ac file.
If you didn't understand that (what's all this about wrapper scripts??),
then you REALLY need to read /usr/doc/Cygwin/auto*.README,
/usr/doc/Cygwin/libtool*.README and check out THIS email message:
Now, which version of libtool are you REALLY using?
P.S. with respect to the cygwin "devel" libtool, it is a work in
progress. It works for everything *I've* tried so far: "normal" C and
C++ dlls. I haven't attempted to hide symbols (as you are doing) so I
can neither confirm nor deny that it works/breaks. Of course, I don't
know if even the OLD libtool-1.4.2 method *really* allows that, so this
may not be a "regression" per se. Also, Ralf Habacker *previously*
problems wrt KDE DLLs using the 20010531 cygwin "devel" libtool, but I
don't know whether the 20020202 cygwin "devel" libtool fixes those
problems for him. (Again, this is not a regression because 1.4.2 can't
build the KDE DLLs at all, so...)
Stephano Mariani wrote:
> Yes, I have, and unfortunately, it does not work!
> I have been looking through the source code of the libtool generated by
> configure... it seems that it generates an .exp file using the following
> /usr/bin/nm -B .libs/libfile_somefile.o | sed -n -e 's/^.*[
> ]\([ABCDGISTW][ABCDGISTW]*\)[ ][
> ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort
> | uniq > .libs/libfile.exp
> And passes it to ld via gcc using -Wl,-retain-symbols-file
> This seems flawed to me since ld simply ignores it as far as I can see!
> Stephano Mariani
>>From: Charles Wilson [mailto:email@example.com]
>>Sent: Monday, 18 February 2002 7 14
>>To: Stephano Mariani
>>Subject: Re: Specifying a .def file for use with libtools libraries
>>This is kindof a kluge, but try this:
>>libname_la_LDFLAGS = foo.def <-no-undefined and other link flags>
>>Stephano Mariani wrote:
>>>Is there a way to use something similar to .def files with libtool.
>>>have no way of limiting the export list, and the -export-symbols
>>>directive in the libname_la_LDFLAGS seems not to work.
>>>I could go and rename all the symbols to avoid conflicts, but I
>>>rather not... there has to be a way to do this using libtool.
>>>Please help! I am fast getting desperate enough to drop libtool
>>>Thanks in advance,
>>>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>>>Bug reporting: http://cygwin.com/bugs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html