This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linking agains libstdc++.so.5 on gcc > 3.4
- From: "luca regini" <luca dot regini at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 27 Aug 2008 16:43:05 +0200
- Subject: Linking agains libstdc++.so.5 on gcc > 3.4
I am currently using a shared library (whose source i don't have
access to) that is linked against libstdc++.so.5. For reasons that i
am not into explaining we must compile and link
against this library on RedHat Linux EL 5 that comes with a gcc > 4
and defaults its c++ runtime to version 6 ( libstdc++.so.6). This
results in memory leaks because memory
allocated on one runtime cannot be freed on the other. Is there a way
to force linking on libstdc++.so.5? From an internet search it seems
to me that the only way is to build gcc 3.3 on my development box. If
this is the answer then i would like to know how can the built gcc
version be able to use libstdc++.so.5 since the default runtime is
libstdc++.so.6.
Thanks in advance,
Luca Regini