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: binary incompatibility of code compiled w/ gcc 2.96 and 3.0.4


At 13.13 17/04/2003 -0400, Stephen J Fromm wrote:
I'm writing C/C++ code for a CGI program.

[...]

Why is this?  And is there a way to run the gcc-3.0.4 binaries on the
webhosting site, ...

GCCs before 3.2.x have different C++ ABIs, so if you call/use any external C++ library (say, libstdc++ :-), it won't work.
The ABI is being standardized from 3.2.0 onwards, barring any bugfixes.


... or will I be forced to use gcc-2.96?  (I'd rather not do
the latter, as 2.96 doesn't seem to properly deal with C++ namespaces.)

If your code runs as a stand-alone executable (ie. not inside a library), you might try to link it statically against any C++ library, thus not using the system ones.
g++ -static should do this.


TIA,

sjfromm


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