像NSObject.h,NSObjCRuntime.h这样的基类中有成千上万的错误 [英] Thousand of errors in base classes like NSObject.h,NSObjCRuntime.h

查看:79
本文介绍了像NSObject.h,NSObjCRuntime.h这样的基类中有成千上万的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道它为什么会发生....我集成了一个twitpic api,并且除一个项目外,它在所有项目中都能正常工作.我收到5488错误,在NSObject.h和NSObjCRuntime.h之类的错误中也是如此.这个api有一个名为Crypto的文件夹,其中有两个.c文件,当我从项目中删除该文件夹时,错误减少为1(因为使用了该文件夹中的某个类,否则在其他地方使用).所有5k +错误仅在这两个类中,错误就像

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

很少有错误

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

我确定的一件事是,在类中没有错误,因为相同的代码在其他项目中运行良好. 还有一件事要提到,我有两个.pch,删除其中一个没有效果.

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.

推荐答案

将文件编译为objc,而不是c

compile the files as objc, not c

这篇关于像NSObject.h,NSObjCRuntime.h这样的基类中有成千上万的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆