
Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
> GCC switched to using a dylib version of it for better system
> performance, and because the C++ ABI was finally implemented fully, so
> libstdc++ could be guaranteed to be compatible from release to release.
That is true but it only goes for compiled binaries, right? In otherwords
people will have problems when I try to compile object code with g++ 4.0.1
and they will use _any_ other version of g++. This can (an probably will)
result in faulty linking which could succeed and eventually end up as
runtime errors. With the static linking I avoided that scenario.
> Mac OS X 10.3.9 includes libstdc++.dylib. If you can require 10.3.9 or
> later, you can use gcc 4.0 (or 4.0.1) and you'll be fine. If you need
> to support earlier versions of Mac OS X, you'll have to use gcc 3.3 for
> the PowerPC side of your application and gcc 4.0 or later for the Intel
> side. Xcode 2.2 supports per-architecture compilers, SDKs, and
> deployment targets.
Thanks for the notice. I still wonder how to detect which OS I'm compiling
under. There is a env variable named OSTYPE and is set to 'darwin8.0'. If I
remember correctly OS 10.3 was Darwin 7.x.
-- John
Eric Albert - 14 Nov 2005 10:09 GMT
> > GCC switched to using a dylib version of it for better system
> > performance, and because the C++ ABI was finally implemented fully, so
> > libstdc++ could be guaranteed to be compatible from release to release.
> That is true but it only goes for compiled binaries, right? In otherwords
> people will have problems when I try to compile object code with g++ 4.0.1
> and they will use _any_ other version of g++. This can (an probably will)
> result in faulty linking which could succeed and eventually end up as
> runtime errors. With the static linking I avoided that scenario.
With static linking, you couldn't build object files that were
compatible between compiler versions because the ABI was different
between each compiler version. Now the ABI has been finalized, so
anyone using gcc 4.0 or later can use the libstdc++ dylib.
> > Mac OS X 10.3.9 includes libstdc++.dylib. If you can require 10.3.9 or
> > later, you can use gcc 4.0 (or 4.0.1) and you'll be fine. If you need
[quoted text clipped - 6 lines]
> under. There is a env variable named OSTYPE and is set to 'darwin8.0'. If I
> remember correctly OS 10.3 was Darwin 7.x.
You generally don't want to do this. The OS that you're targeting is
the interesting value, not the OS that you're building on.
-Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/