On Aug 4, 3:41 pm, Robert Heller <[EMAIL PROTECTED]> wrote: > At Mon, 4 Aug 2008 10:52:38 -0700 (PDT) Derekasaurus Rex <[EMAIL PROTECTED]> > 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 > Administrationhttp://www.deepsoft.com/ -- Web Hosting, with CGI and Database > [EMAIL PROTECTED] -- Contract Programming: C/C++, Tcl/Tk
Thanks. Though the name mangling *is* compatible between 3.2 and 3.3 because I have already successfully linked my 3.2-compiled application code with my 3.3-compiled libraries. Furthermore, the applications *appear* to work, though I haven't run a full regression. Nevertheless, this probably has more to do with luck than intentional compatibility, so I agree that recompiling everything is probably the most sane approach, and it's the one I will pursue. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus