views:

2429

answers:

3

Hi guys, I keep on getting this error "error: expected specifier-qualifier-list for core data code im working with, in the app delegate.

Now when i get this error and about 40 other errors relating to managedobjectcontext etc, i thought maybe the library needs to be imported. Now i havent done this before, but i went to Frameworks group and add existing frameworks and it added CoreData.framework. I re-build and it still came up with the error. Do I need to import anything in the headers explicitly or is there some other step i need to do?

Thanks

+2  A: 

Can you specify the exact error? The bit after "for" is probably the important part.

Noah Witherspoon
Hi mate, I worked it out, I have to add a #import <DataCore/DataCore.h> to the header and body files. It all works now thanks Noah
Doron Katz
A: 

The error expected specifier-qualifier-list... indicates that you've tried to use an undefined data type in a member declaration, either in a class or a struct. You need to #import the specific header where the missing type is defined. To find out which header contains the missing type, Command-double-click on the type name to open the header in which it's defined. Next, hold down the Command key and click on the title of the window to see the header's full path. For example, command-double-clicking on "NSImage" opens up the NSImage.h file, and command-clicking the title shows that it's in AppKit.framework. So the import statement for this header would be #import <AppKit/NSImage.h>.

Scott Lahteine
+1  A: 

You're right, but it's...

#import <CoreData/CoreData.h>
rob5408
Yeah sorry typo :)
Doron Katz