If I compile a short Programm with g++ and I declare a STL-String (only
declare!), than it is ok ("g++ -c -Wall Progname.c").
But if I link the same programm with "g++ -o Progname Progname.o", than I get
an linker error:
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<
char>, std::allocator<char> >::basic_string()
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<
char>, std::allocator<char> >::~basic_string()
If I use some other STL-Funtions as e.g. "maps", "vectors", I get no errors.
I also have tried the "gcc-4.2.0", but the same problem (as with -> "gcc
4.0.0").
Even a linker option "-lstdc++" does not help.
--
Summary: Undefined Symbol: std::basic_string
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stefanwin at gmx dot net
GCC host triplet: IBM PowercPC / AIX 5.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44092