"brusch" <[EMAIL PROTECTED]> writes:

> I have a library which is compiled using gcc version 2.96 (or 2.95.3).

Your message (further down) implies that the library contains C++.
C++ code compiled with different compilers (gcc-2.95 and 3.x
*are* different compilers for all practical purposes), is *not*
link compatible.

> There is no access to the source code of this lib.
> Let's name it "libold.a".

Your best bet is to continue using whatever compiler libold.a was
compiled with.

> There should be a way using a shared object which contains all old
> dependencies and using "plainc.o" as filter, but I don't know how.

You can't use plainc.o as a filter.

On Linux/x86 (but not x86_64) you could link libold.a,
libstdc++-old.a  and plainc.o into libold.so, and carefully hide
(using linker version scripts) all traces of non-C interfaces inside
the DSO, leaving only plain-C exposed, and then use the resulting
DSO with the new version of g++.

This shouldn't be too difficult, but isn't entirely trivial either.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to