Can I use two versions of libstdc++ in one single executable?
Benjamin Kosnik
bkoz@redhat.com
Mon Jul 1 15:21:00 GMT 2002
>
> 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
More information about the Libstdc++
mailing list