Hello--
To be able to use the experimental C++0x features in the most recent gcc
4.5.0, I downloaded and compiled gcc from source on Mac OS X Snow
Leopard 10.6.3. The compiler used to bootstrap gcc 4.5.0 was gcc 4.2.1,
which ships with the Apple XCode tools.
I configured gcc 4.5.0 with --prefix=/usr/local/gcc/4.5.0. The 64-bit
compile was successful on my 64-bit Core2Duo MacBook Pro with 32-bit OS
X 10.6.3 kernel, and after running "sudo make install" from the
Terminal, the compiler was installed in the /usr/local/gcc/4.5.0
directory. I then added the following line to my .bash_profile file:
export PATH=/usr/local/gcc/4.5.0/bin:$PATH
Now running "gcc -v" from the Terminal shows that the compiler is
currently accessible at the Bash command-line:
Matilda:binutils-2.20 nicholaskinar$ gcc --version
gcc (GCC) 4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Matilda:binutils-2.20 nicholaskinar$ which gcc
/usr/local/gcc/4.5.0/bin/gcc
However, I am now finding that when compiling some software (i.e.
binutils), I receive the following error:
cc1: warnings being treated as errors
strings.c: In function ‘strings_file’:
strings.c:419:3: error: ‘stat64’ is deprecated (declared at
/usr/include/sys/stat.h:465)
Apparently, this may indicate that the compiler is finding old header
files in the /usr/include/sys/ directory.
What can I do to ensure that the gcc 4.5.0 compiler does not find the
old header files? I also use Eclipse IDE for development, so I would
like to set it up so that the header search path in both the Terminal
and the IDE is only for gcc 4.5.0 headers.
Moreover, I cannot find the gcc_select script on OS X Snow Leopard, so I
don't know if there is a way to switch the compiler over. Is there also
a way to ensure that the compiler uses headers and shared libraries only
for gcc 4.5.0?
Nicholas