PDA

View Full Version : XCode Error whenever i compile




VisualBasicImp
Feb 28, 2007, 03:19 PM
Whenever I compile a program in XCode, i get this error.

Tool:0: Command /usr/bin/gcc3 failed with exit code 1
Tool:0: Command /usr/bin/gcc3 failed with exit code 1
Tool:0: gcc3: installation problem, cannot exec `/usr/libexec/gcc/darwin/i386/cpp-precomp': No such file or directory
Tool:0: gcc3: installation problem, cannot exec `/usr/libexec/gcc/darwin/i386/cpp-precomp': No such file or directory
Tool:0: gcc3: installation problem, cannot exec `cc1obj': No such file or directory
Tool:0: gcc3: installation problem, cannot exec `cc1obj': No such file or directory

i have no clue what these are. Is it something i can fix?



szymczyk
Mar 1, 2007, 02:57 PM
Judging from the error, it looks like Xcode is trying to use gcc 3 to compile a C++ precompiled header for Intel. This is going to cause problems because you have to use gcc 4 to build for Intel. The error messages you're getting are strange because Xcode 2 uses gcc 4 as the default compiler. You have to add a build setting to use gcc 3 with Xcode 2.

The first thing you should try is to add a build setting that explicitly tells Xcode to use gcc 4.


Select the name of your project from the Groups and Files list.
Click the Info button in the project window toolbar to open the project's information panel.
Click the Build tab in the project's information panel.
Choose Customized Settings from the Collection pop-up menu.
Click the + button to add a build setting.
Give the new build setting the name GCC_VERSION.
Give the new build setting the value 4.0.


If you still get the error messages when compiling, you should uninstall the Xcode Tools and reinstall them.