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

Re: How do I get libtool to use g++?



Neil Roeth <neil@debian.org> writes:

> I recently had a bug (193950) filed against one of my packages because the
> shared libraries had "undefined non-weak symbols" - libstdc++ was not being
> linked in.  I resolved it with what I consider a gruesome hack.  I discovered
> that forcing libtool to use g++ while linking would automatically link in
> libstdc++.  The hack came about because I could not figure out how to get
> libtool to use g++ instead of gcc.  So, I did
>
> sed -e 's/CC="gcc"/CC="g++"/g' libtool > lt.tmp && mv -f lt.tmp libtool
>
> to force it.  What's the right way to get libstdc++ linked in to shared
> libraries of C++ code?  The package uses autoconf, automake, libtool, etc.

Use -lstdc++ and don't use libtool?  Libtool doesn't really support c++
libraries[1].  Well, libtool CVS sort of does, but it's still fucked (this
*is* libtool we're talking about here).

Libtool itself is a gruesome hack and needs to be put to rest.

[1] http://www.gnu.org/manual/libtool-1.4.2/html_node/libtool_53.html

-- 
Looks like excitement by repetition!

Attachment: pgpVskyOki6h6.pgp
Description: PGP signature


Reply to: