[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link g++ 3.3 libs with g++ 3.2 binary?

From: Robert Heller
Subject: Re: Link g++ 3.3 libs with g++ 3.2 binary?
Date: Mon, 04 Aug 2008 14:41:59 -0500

At Mon, 4 Aug 2008 10:52:38 -0700 (PDT) Derekasaurus Rex 
<> wrote:

> I have a C++ product that consists of application code and quite a few
> OSS libraries. Until recently everything was compiled using g++
> 3.3.2-1 (henceforth 3.3). Unfortunately this compiler is not the
> standard version on my target Linux platform (CentOS 3.9) which uses
> the slightly older gcc-3.2.3-59 (henceforth 3.2) in its standard
> toolchain.
> The decision to use a non-standard version of GCC was a foolish one
> and I want to revert our project to g++ 3.2, the standard version for
> our CentOS 3.9 platform.
> Naturally it would be ideal if I could rebuild every line of code with
> g++ 3.2 for a completely clean re-compile. However, for reasons beyond
> the scope of this post, there is some risk and complexity associated
> with this, and rebuilding every third-party OSS library with g++ 3.2
> is not trivial.
> Would it be completely foolish to switch compilers and build all of my
> application code with g++ 3.2 while continuing to link with OSS
> libraries built with 3.3? Does g++ offer sufficient binary
> compatibility within the 3.x tree? Or is the only responsible path to
> rebuild all of my code, including third-party libraries, with the same
> compiler, namely 3.2?
> Of course I plan to eventually rebuild everything with 3.2, but I'm
> trying to understand if this can be done in stages (i.e., application
> code first, then third-party libraries).
> Any input appreciated. Thanks.

You *should* re-build everything with the same version of the compiler.
I know, a complete pain, but there is probably nothing else you can do.
The name mangling is not compatible across versions.  I believe Gcc is
version compatible at the patch level -- eg all 3.2.x versions are
inter-compatible and all 3.3.x versions inter-compatible, but 3.2.x and
3.3.x are NOT inter-compatible.


Robert Heller             -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software        -- Linux Installation and Administration  -- Web Hosting, with CGI and Database       -- Contract Programming: C/C++, Tcl/Tk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]