This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem linking a 3.2 program with older (< 3.2) libs


Hi Matthew,

The C++ ABI changed between GCC 2.95 and GCC 3.x.

(It also changed between the maverick Red Hat 2.96 release and GCC 2.95, and
RH 2.96 and GCC 3.x.)

The C ABI is the same between GCC 2.95, RH 2.96, and GCC 3.x.

Since you are obviously trying to link C++ code across versions, you'll find
the challenge to be icky.

What you'll have to do is take a RH 2.96 compiler (which I assume is the one
that your old code is using) and write a C thunk layer.

Then you'll have to take your GCC 3.2 compiler, and make it's C thunk layer.

The C ABI thunk layer acts as the bridge between RH 2.96 and GCC 3.2.

Then you'll have the strong C barrier that will allow you to marry your code
together.

Much preferable, IMO, is to get a library built with GCC 3.2.  But that may
not be an option for you.

Sincerely,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]