could not build module foundation

今天新建工程,突然发现爆出could not build module foundation的bug,就是运行不了,clean也没用。


在网站

http://stackoverflow.com/questions/19723392/adding-c-file-causes-pch-error

找到解决方案,说是

Surround #import's with preprocessor directive #ifdef __OBJC__ #endif

Thanks! That was it. I think I figured out why this works: the pch is included as a prefix into both C and ObjC files. So my C files were getting Foundation.h which of course would never work

我的问题也是在内部同时导入了c和oc头文件,我尝试注释掉c文件的引用,ok,能够build运行了,

貌似是既有c文件又有oc文件会出这个问题,但我取消注释后,又没事了,纳闷。


你可能感兴趣的:(IOS)