Archive for the ‘xcode’ Category

XCODE – change compiler version to 4.2

June 30, 2010

I’m running the latest version of xcode (3.2.3), which includes gcc 4.2. Today when I upgraded core-plot I ran into syntax errors with UIView.h. This was due to xcode using gcc 4 and not gcc 4.2.

Using the project info dialog I was unable to set the compiler version to 4.2 (even though it was showing that it was set to 4.2). To make this change stick, don’t start changing environment variables and symbolic links to fool xcode to use gcc 4.2 instead of 4. Instead, in your project info dialog, select the Other… option for C/C++ compiler and simply enter 4.2.Enter 4.2 Now when you build your project the 4.2 version instead of 4.0 version of the compiler is used. This ought to get rid of those pesky compiler errors when the system tries to compile the prefix file, echoing syntax errors with UIView.h file.