On Feb 16, 2009, at 8:37 AM, Alejandro Aragon wrote:
Even though I upgraded to 3.1.2 and g++-4.2 has been installed, I cannot find the header files for the standard library for the version 4.2. Only the 4.0.0 files are installed under /use/include/c++. Do I need to do something special to install these header files?
The problem I have is that I'm trying to use the new hashed containers from the tr1_impl folder. I have them installed in the macports repository, but for some reason the Intel C++ compiler won't compile those files, so I'm hoping that it will compile the ones provided by gcc 4.2 (Apple version).
Because gcc 4.2 was introduced after Mac OS X 10.5 shipped, and the dylibs that back the C++ Standard Library ship with the OS, gcc 4.2 uses gcc 4.0's C++ standard library implementation. The 4.0.0 files are the ones that gcc 4.2 uses; you can verify this easily with -v:
$ /usr/bin/g++-4.2 -v C++.cpp
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5566~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5566)
/usr/libexec/gcc/i686-apple-darwin9/4.2.1/cc1plus -quiet -v -D__DYNAMIC__ C++.cpp -fPIC -quiet -dumpbase C++.cpp -mmacosx-version-min=10.5.6 -mtune=core2 -auxbase C++ -version -D__private_extern__=extern -o /var/folders/ie/ieqneNNuGMqfKcxjnvLebE+++TI/-Tmp-//ccLOgykm.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-apple-darwin9/4.2.1/../../../../i686-apple-darwin9/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.0.0
/usr/include/c++/4.0.0/i686-apple-darwin9
/usr/include/c++/4.0.0/backward
...