Jump to content
5 posts in this topic

Recommended Posts

Hey everyone,

 

I'm new to this site (first post), and new to Mac's (got my new MacBook 1 week ago today) and Mac development. I'm in Electrical Engineering so I've got some software experience, but mostly with C++. I think I'm picking up Objective C pretty well so far. I'm just having one problem:

 

I'm trying to write a really basic iPhone app to get me started, and in the first class I've made, the line:

 

#import <Cocoa/Cocoa.h>

 

gives me an error saying "error: Cocoa/Cocoa.h: No such file or directory"

 

Also, I did try searching on here, but it gives me an error every time.

 

Thanks for your help.

I have not done any iPhone programming yet, but I have about five years of Cocoa experience.

 

I assume you have appropriately set-up an Xcode project for iPhone, if not that is your first problem.

 

This might a be mistake for iPhone (I am not sure):

#import <Cocoa/Cocoa.h>

 

The Cocoa framework per se is for OS X, not iPhone. You might have to import the special framework for iPhone. If you use Xcode to automatically create the files for you new class, it should create the correct import for you.

Ya I used XCode to create the files and I think I've set up the iPhone app project properly...hmm. I guess I'll download some sample code and investigate.

 

Thanks for your help.

×
×
  • Create New...