开发者

Thousand of errors in base classes like NSObject.h,NSObjCRuntime.h

开发者 https://www.devze.com 2023-02-16 20:22 出处:网络
I don\'t know why its happening .... I an integrating a twitpic api and its working开发者_开发知识库 fine all the projects except one. I am getting 5488 errors and that too in classes like NSObject.h

I don't know why its happening .... I an integrating a twitpic api and its working开发者_开发知识库 fine all the projects except one. I am getting 5488 errors and that too in classes like NSObject.h and NSObjCRuntime.h . This api has a folder named Crypto which has two .c files in it, when i remove this folder from my project then the error decreases to 1 (because one of the class from this folder is used else where).All 5k+ errors are in these two class only, errors are like

FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);
                         expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

few errors are

expected identifier or '(' before '@' token
expected identifier or '(' before '-' token
expected identifier or '(' before '+' token

One thing i am sure of is that there is no error in the classes because the same code is working good in other projects. One more thing to mention is that I have two .pch and there is no effect of removing one of them.


compile the files as objc, not c


Usually these errors are caused by a problem in the .pch file, like an #import that doesn't belong, or something similar.


I got this error several times. This could happen because of superfluous curly bracket. Like

- (void)a {
}
}

Check latest changes in a project.

0

精彩评论

暂无评论...
验证码 换一张
取 消