views:

389

answers:

4

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

A: 

It sounds to me like your installation is borked.

When you installed Xcode4 did you make sure to install it to a completely separate directory to your existing Xcode install?

It could also have something to do with your include paths or something in that vein. I'm not too sure how to go about fixing that.

I would suggest backing up any custom templates etc. and running the uninstall script for both Xcode 3.x and 4, and then reinstalling to see if that fixes the issues.

Jasarien
Xcode4 forces you to install to a separate directory. I'll go ahead and try uninstalling both and let you know what I find out.
MikeyWard
Mmmmnope. No dice. Just realized that it's a new problem since Xcode 3.2.4. Guess I'll have to stick with on-device testing until I get a chance to get it better figured out. Once I do, I'll post here. At least it's the Simulator that's not working and not the device!
MikeyWard
Hm, I'm not sure then. Sorry :(. Good luck in figuring it out.
Jasarien
+5  A: 

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
hotpaw2
Thanks, that fixed the problem I just had after downloading xcode 3.2.4
Nuoji
A: 

Without violating NDA (Xcode 4 is prerelease software), I recommend you read this thread in the Apple Developer Forums.

Brad Larson
A: 

This is now (Saturday 11th) a well-known bug.

For the simulators, you have to use GCC (not LLVM) and that's that.

Joe Blow