xcode项目编译C/C++文件could not build module foundation

我们经常会遇到 项目加入 C或者C++文件的时候 出现  could not build module foundation错误 

需要加上 

  1. #ifdef __OBJC__  
  2.     #import <UIKit/UIKit.h>  
  3.     #import <Foundation/Foundation.h>  
  4. #import "AppDelegate.h"  
  5. #endif

表示宏内引用的文件确保只被使用Objective-C语言的文件所引用,保证引用关系的清晰。

posted @ 2015-07-14 12:23  Rui.peng  阅读(716)  评论(0编辑  收藏  举报