GCC 4.2 is not compatible with the Mac OS X 10.4 SDK

Go in the XCode to

Project > Edit Project Settings > Base SDK

And select MAC OSX 10.6 ;)