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

How do I get libtool to use g++?



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.

-- 
Neil Roeth



Reply to: