binary incompatibility of code compiled w/ gcc 2.96 and 3.0.4
Andrea 'fwyzard' Bocci
fwyzard-gcc@libero.it
Thu Apr 17 17:34:00 GMT 2003
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
More information about the Gcc-help
mailing list