On Tue, Mar 23, 2004 at 06:06:28PM +0200, Alexander V. Karelin wrote:

> when linking code compiled with g++ 3.2.2 with a library that has been 
> compiled with gcc 2.x.x, the linker fails finding references.

There is no C++ binary ABI between gcc 2.xx releases and gcc 3.xx
releases. In other words, this is not a bug, it's a feature. Or at
least a documented bug. 

> Now... The problem is that the library in question, if compiled from
> scratch (it's  
> the libodbc++) with g++ 3.2.2 fails compilation. I've tried looking for 
> some sort of explanation for this phenomena but with no luck so far. Any 
> help would be appreciated! Thank You!

The proper thing to do is to fix the library to compile with g++
3.2.2., I'm afraid. 

For more on C++ ABI, see
http://www.gnu.org/software/gcc/bugs.html#nonbugs_cxx. Reading it
again, I see it's even worse - there's no ABI compatibility between
*any* g++ major releases. Quoting from the above URL: 

"If you change your compiler to a different major release you must
recompile all libraries that contain C++ code."

Cheers, 
Muli 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to