Error: expected list of qualifiers before ... in XCode Core Data

I keep getting this error "error: expected qualifier-classifier-list for the master data code it is working with in the application delegate.

Now when I get this error and about 40 other errors related to managedobjectcontext etc., I thought that maybe the library needs to be imported. Now I have done this before, but I went to the Frameworks group and added existing frameworks and it added CoreData.framework. I am rebuilding and still came up with an error. Do I need to import anything in the headers explicitly or is there some other step I need to take?

thank

+2


source to share


3 answers


You're right, but this ...



#import <CoreData/CoreData.h>

      

+1


source


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



+2


source


The error expected specifier-qualifier-list...

means that you tried to use the undefined data type in a member declaration, either in a class or in a struct. You need to #import

provide a specific header where the missing type is specified. To find out which heading contains the missing type, Command-double-click the type name to open the heading in which it is defined. Then hold down the Command key and click on the window title to see the full path to the title. For example, double-clicking a command on "NSImage" opens a file NSImage.h

, and pressing a key on a title shows that it is in AppKit.framework

. So the import statement for this header will be #import <AppKit/NSImage.h>

.

+2


source







All Articles