This is the mail archive of the
mailing list for the libstdc++ project.
- From: Stephan Bergmann <stephan dot bergmann at sun dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 27 Mar 2003 13:56:19 +0100
- Subject: Mixing libstdc++.so.3/5
I'm wondering whether it is possible to simultaneously have
libstdc++.so.3.0.1 (GCC 3.0.1) and libstdc++.so.5.0.2 (GCC 3.2.2) in one
process, on Linux. Sorry if this has already been discussed or is
The scenario (the OpenOffice.org suite) is as follows: There is a
process composed of C++ shared objects built with GCC 3.2.2 (depending
on libstdc++.so.5.0.2). This process can dynamically load in additional
components. Some of the components would be built with GCC 3.0.1, so
they would also bring libstdc++.so.3.0.1 into the process. Those
components are loaded RTLD_GLOBAL, so any symbols needed by those
components that are available in both versions of libstdc++ would be
taken from libstdc++.so.5.0.2 (which comes earlier in the search tree).
I noticed that none of the symbols exported by either version of
libstdc++ are versioned. The functionality the process and the
additional components actually use from libstdc++ is mostly the __cxa
and namespace __cxxabiv1 symbols; the namespace std stuff should be
mostly ignored, as all C++ code is built against the STLport (using
A small test suggests that mixing libstdc++.so.3.0.1 and
libstdc++.so.5.0.2 in one process works (even passing exceptions), but I
don't feel too well with such experimentation only.
Can anybody tell me whether my test working properly is either by sheer
luck or by design?