This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Mixing libstdc++.6 and libstdc++.5 in the same application
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Magnus SjÃgren <magnus dot sjogren at comsol dot se>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 12 Feb 2008 17:32:41 -0600
- Subject: Re: Mixing libstdc++.6 and libstdc++.5 in the same application
- References: <47B19F72.4020209@comsol.se> <m3wspalzkl.fsf@localhost.localdomain>
> There are some relatively baroque ways to get around this. For
> example, you can use the linker's -F/--filter option to create a new
> dynamic library which defines only the symbols exported by the C API.
> That should hide the libstdc++.so.5 symbols from the dynamic linker,
> and prevent the overriding confusion. But I haven't actually tried
> this, and I can't promise that it will work.
Another, less baroque way to do this is to mangle in a version to
the symbol name via a nested "version" namespace in namespace std. This
is the point of --enable-symvers=gnu-versioned-namespace.
Due to the tremendous churn in headers and namespaces, this may have
some issues on mainline (Which I will try to fixup), but should work
on 4.2.x.
-benjamin