Trying to use the RHEL5.3 GCC 4.3.2 compiler to build my software on that platform. I get the following error no matter what I try when compiling with -O2, but it builds fine without optimization. Any ideas?
/usr/bin/ld: myapp: hidden symbol `void std::__ostream_fill<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, long)' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
In RHEL5.3, I am using /usr/bin/g++43
for compilation and linking. The correct libstdc++.so
is found here:
/usr/lib/gcc/i386-redhat-linux6E/4.3.2/libstdc++.so
which is a text file containing INPUT ( -lstdc++_nonshared /usr/lib/libstdc++.so.6 )
.
Wouldn't that mismatch the system stdlibc++ 4.1
version?