Undefined references in libstdc++ headers

Ian Lance Taylor ian@airs.com
Thu Feb 23 17:38:00 GMT 2006


"Placid Pundit" <placidpundit@gmail.com> writes:

> I'm using the latest 4.1 from SVN and most things have worked up to
> this point (I've built a lot of software with it).  But when linking
> the Ogre3D library, I'm seeing a lot of undefined references in
> libstdc++ headers:
> 
> in /usr/include/c++/4.1.0/bits/basic_string.h:230:
> undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char>
> >::_Rep::_S_empty_rep_storage'
> 
> If I pass --enable-fully-dynamic-string when building, the next line
> has a similar problem instead.  And similar problems occur throughout
> the other headers.  So it looks like an installation problem.  But I
> have been unable to find anything obviously wrong with it.

How is the final link being done?  Are you linking with the g++
driver, rather than the gcc driver?  Are you sure you are linking
against -lstdc++?

Ian



More information about the Libstdc++ mailing list