Xcode analyzer error: Analyzer skipped this file due to parse errors

Xcode

Image via Wikipedia

Apple integrated the Clang Static Analyzer into Xcode a while back. It’s a part of the LLVM project and it uses the clang C/C++/Objective-C compiler front-end to the LLVM compiler to perform static analysis.

The static analyzer (or “clang checker”) is really useful for finding common retain/release errors in Objective-C code. You run the analyzer by building your project using the Build and Analyze item under the Build menu.

When I recently went to run the static analyzer on one of my projects using the recently released iOS 4.1 SDK, I got a series of the following types of errors:

Analyzer skipped this file due to parse errors
/var/folders/i9/i9DFseJFFYSMZkTn1Rhbck+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/SeaHawk_Prefix-dowiojzcyzihdsgrlwpnuuxbajci/SeaHawk_Prefix.pch' file not found

The recommended solution is to add the following to Other C Flags in your project’s build settings: -D__IPHONE_OS_VERSION_MIN_REQUIRED=040100 where you replace 040100 with your deployment target version (030200 for 3.2, for example).

 

Advertisements
Tagged with: , ,
Posted in Uncategorized

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Categories
%d bloggers like this: