libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: pr-msvc-support: building .DLLs with symbols


From: David Byron
Subject: RE: pr-msvc-support: building .DLLs with symbols
Date: Thu, 3 Sep 2009 11:24:51 -0700

> You want to send -DEBUG to link.exe, not to cl.exe. I'm
> sure you know this, but simply adding -DEBUG to LDFLAGS is
> not the way you do this. The correct way would be to use
> -Wl,-DEBUG. If the msvc stuff were complete, libtool would
> then feed -DEBUG to the linker.  But this does not
> currently work, and the main reason is that the -link
> option to cl.exe is "different". It feeds all options
> (instead of just one) after the -link option on the
> command line to the linker, so it would be very bad to
> just transform -Wl,foo into -link foo.

Makes sense.

> > Can someone show me how to do this without hacking the
> > libtool file?
> 
> You can work around the above -Wl,foo limitation in two
> ways.
> 
> 2) Use a response file, like this:
> 
> $ cat linkdebug
> -link -DEBUG
> $ /bin/sh ./libtool --tag=CC   --mode=link cl @linkdebug -MD -Zi \
> -no-undefined -export-symbols symfile  -o libfoo.la \
> -rpath /usr/local/lib libfoo_la-public.lo libfoo_la-private.lo

This works well, though way I integrated it with autoconf and automake is a
bit cumbersome.  Trouble is, it works so it's harder to motivate to dive in
and fix libtool to do the right thing with -Wl,-DEBUG.

Thanks again.

-DB





reply via email to

[Prev in Thread] Current Thread [Next in Thread]