This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Can I use two versions of libstdc++ in one single executable?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: <fchen at pingtel dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 1 Jul 2002 15:13:52 -0700
- Subject: Re: Can I use two versions of libstdc++ in one single executable?
- Organization: Red Hat / San Francisco
- References: <000c01c22145$2b915500$b701010a@sanjuan>
- Reply-to: bkoz at redhat dot com
>
> We have a project on Linux that uses both our own libraries and third
> party libraries. However, there is a problem to build this project
> because the third party libraries can only be built using gcc 3.0.2,
> while our own libraries can only be built with gcc 2.9.6 - compiler
> errors are primarily because of the iostream stuff - see the example
> below:
>
> /usr/local/gcc-3.0.2/include/g++-v3/backward/iostream.h:35: using
> directive
> `ostream' introduced ambiguous type `ostream'
> /usr/local/gcc-3.0.2/include/g++-v3/backward/iostream.h:36: using
> directive
> `istream' introduced ambiguous type `istream'
> /usr/local/gcc-3.0.2/include/g++-v3/backward/iostream.h:37: using
> directive
> `ios' introduced ambiguous type `ios'
I'm not quite sure how you get this error message. Care to elaborate?
It looks like ios/istream/ostream have not been declared.
> a) Is there a way to build something using gcc 3.0.2 while using a
> previous version of the libstdc++? Maybe some build switches?
No.
> b) If the answer to a) is yes, will the final result work properly,
> i.e., with two different copies of the c++ std libraries running at
> the same time?
The answer to a is no.
Sorry.
-benjamin