Linking to proprietary C++ library in old ABI format using gc c-3. 2
Thu Dec 11 09:26:00 GMT 2003
We've had little response from our database vendor regarding getting their
library built using GCC 3.2 so that eliminates option 1.
How would this thunk layer work ? The first thing our product architect
asked me is what would happen if their were any static initializers in the
library being thunked ? How does one even get at a C++ object from C ?
As for using a different database, unfortunately we form a small part of a
much larger system that has been standardised on this database; there goes
option 3 :(
Unfortunately regressing back to 2.95 looks like it will be quite an
involved undertaking. we will probably end up not doing integration testing
with third parties using the Linux port and wait for the new version of the
database which they reckon will have support for both old and new ABI's in
the libraries althought this is by no means a sure thing.
I will be looking at the Intel C++ compiler as a stop-gap so we could
actually include the Linux port in our integration testing. I will also be
looking at getting the latest libstdc++ to compile with GCC 2.95 and if
anyone is interested will report back to the list on the outcome.
Thanks for the input.
From: Eljay Love-Jensen
Sent: 10 December 2003 17:40
To: Nic Groenewald; 'email@example.com'
Subject: Re: Linking to proprietary C++ library in old ABI format using
Option 1 (most recommended):
Get your vendor to provide you with a GCC 3.2 library.
Make a GCC 2.95 C interface thunk layer to the library.
On your GCC 3.2 side, make facade classes that calls through the C-ABI thunk
Use a different database. Preferably one that is open source, so you'll
never be stuck in this situation again.
Option 4 (least recommended):
Regress your code back to GCC 2.95 level of C++ compliance.
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
More information about the Gcc-help