XCODE – change compiler version to 4.2

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.

One Response to “XCODE – change compiler version to 4.2”

  1. Marius Says:

    Thank you! Great post, helped me a lot. Thanks again

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: