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. 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.