undefined versioned symbol from GLIBCPP_3.2

Nicolas F Rouquette nicolas.rouquette@jpl.nasa.gov
Wed Nov 13 10:52:00 GMT 2002


Can someone provide some advice about resolving this type of error?

undefined versioned symbol name std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::find_first_not_of(char 
const*, unsigned, unsigned) const@@GLIBCPP_3.2

In principle, I understand that the linker is telling me that this 
versioned symbol isn't found in any of the libraries given.
However,  I'm puzzled that this is a symbol from the standard library, 
not one of my own.

I built from sources gcc 3.2 on RedHat 7.3.
I'm trying to link a shared library made of C++ object files.

/opt/gcc-3.2/bin/g++ -v-ldl -lpthread -lrt 
-Wl,-rpath-lin\k,/opt/gcc-3.2/lib -Wl,-rpath,/opt/gcc-3.2/lib [... 
object files ...] -shared -o mylib.so
Reading specs from /opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/opt/gcc-3.2
Thread model: posix
gcc version 3.2
 /opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/collect2 -m elf_i386 
-shared -o mylib.so /usr/lib/crti.o 
/opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtbeginS.o  -L/lib 
-L/opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2 
-L/opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../.. -lstdc++ -ldl 
-lpthread -lrt -rpath-link /opt/gcc-3.2/lib -rpath /opt/gcc-3.2/lib
[... object files ...]
 -lstdc++ -lm -lgcc_s -lc -lgcc_s 
/opt/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtendS.o /usr/lib/crtn.o
/usr/bin/ld: mylib.so: undefined versioned symbol name 
std::basic_string<char, std::char_traits<char>, std::allocator<char> 
 >::find_first_not_of(char const*, unsigned, unsigned) const@@GLIBCPP_3.2
/usr/bin/ld: failed to set dynamic section sizes: Bad value

Any suggestions?

-- Nicolas.




More information about the Gcc-help mailing list