steps to solve a project that does not compile

advertisements

Pulling my hair out in trying to get a simple window based project to compile.

I am running both 3.2.2 and 3.2.3 versions of Xcode. The latter is set up in a separate folder.

Originally I used the latter to create and compile my project against the new 4.0 sdk. It compiled fine. Then I made the mistake of deleting some sdks I thought I no longer needed.

Ever since I can no longer compile.

Right now I get a dozen or so errors similar to the following "_OBJC_CLASS_$_CATransition", referenced from: objc-class-ref-to-CATransition in ViewTransitionsAppDelegate.o

My active executable is the iphone simulator 4 and Base SDK is iPhone device 3.0.

I tried reinstalling the xcode3.2.3 installer, no difference.

I'm totally stymied, as my project WAS working and compiling fine, both to the simulator and external device.

Are there any best practices or recommended steps in fixing or rebuilding a project when it won't compile?

Any help welcome!


Make sure that your application is linked against QuartzCore.framework and that you're importing the CoreAnimation headers wherever you use CATransition:

#import <QuartzCore/CoreAnimation.h>

Otherwise, I'd recommend completely deleting all installations of Xcode/Dev Tools from your system (do a thorough clean) and reinstall the latest SDK.

EDIT: Also forgot to mention that the latest iPhone SDK (iOS 4), at least for me, does not include previous versions of the iPhone SDK. It only includes the 3.2 and 4.0 SDKs, so you will have to edit the target/project settings of your app to use iPhone SDK 4.0.