Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLVM 2.0 can't build for iPhone simulator. GCC 4.2 works fine

When I build my project (any project, really - I tried creating a new empty project with the same results), it builds fine with GCC 4.2 under either Xcode4 or Xcode 3.2.4.

If I build using LLVM 2.0 under Xcode4 or with LLVM 1.5 under Xcode3, I get compile-time build failures, but only when building for the Simulator.

The build errors that I get under LLVM are all in headers over which I have no control, such as UIView.h, UIDevice.h, UIApplication.h, UITextView.h and UIWebView.h in UIKit and CGPDFContext.h in CoreGraphics.

Here's an example error, in WebView.h:

@property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0);   //<--- Unknown type 'UIDataDetectorTypes'

when UIDataDetectorTypes is indeed declared in UIDataDetectors.h which is included in that file.

sniff

like image 647
MikeyWard Avatar asked Sep 03 '10 14:09

MikeyWard


1 Answers

Might be a bug in Xcode 3.2.4 or the SDK configuration.

Try placing a line like one of these in your Build Settings Preprocessor Macros:

-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100 

or

-D__IPHONE_OS_VERSION_MIN_REQUIRED=030103
like image 192
hotpaw2 Avatar answered Nov 04 '22 16:11

hotpaw2