A simple question is - can I link the g++ linker to a specific version of the libstdc++ ? I did not find anything useful in the gcc / g++ man page, and other issues here.
Here's the situation - my application uses a specific shared library created using libstdc++.so.5 , and I want to install and use it on RHEL5 . Therefore, when I try to create an application on an RHEL5 machine, I received a warning:
warning: libstdc++.so.5, needed by ..the_shared_library_.. may conflict with libstdc++.so.6
Installing compat-libstdc++ rpm did not help, the program crashes from the std::string destructor due to inability. So, on this RHEL5 machine, I have this:
[ root@xxx ]
and when i do
[ root@xxxx ]
which is bad since I know its undefined behavior: /
So, is there a way to create my executable using only libstdc++.so.5 ? (uninstalling libstdc++.so.6 not an option due to many reasons. Static binding is also not an option).
Thanks a lot!
source share