COCOS2D #error "Cannot recognize the target platform; are you targeting an unsupported platform?"

来源:互联网 发布:windows asp.net 编辑:程序博客网 时间:2024/06/05 03:26

在mac下面  出现了  #error  "Cannot recognize the target platform; are you targeting an unsupported platform?"  的错误信息,该如何解决呢?

首先我们分析问题的原因,翻译为中文大意就是 系统没有找到对应的平台信息。

在xcode里面的解决办法是:

找到


点击自己的project,然后选择build Settings

找到 Apple LLVM compiler 4.2 - preprocessing

找到 preprocessor Macros  下面的debug

点击右边的debug  弹出一个框

在里面一定要写上CC_TARGET_OS_IPHONE

就可以了