在vc上新建cocos2dx项目,调试时遇到
1>f:\coco2d-x\workspace4cocos2d\hellococos\hellococos\proj.win32\main.h(11): fatal error C1083: 无法打开包括文件:“CCStdC.h”: No such file or directory
1> HelloWorldScene.cpp
1>f:\coco2d-x\workspace4cocos2d\hellococos\hellococos\classes\helloworldscene.h(4): fatal error C1083: 无法打开包括文件:“cocos2d.h”: No such file or directory
1> AppDelegate.cpp
1>f:\coco2d-x\workspace4cocos2d\hellococos\hellococos\classes\appdelegate.cpp(1): fatal error C1083: 无法打开包括文件:“cocos2d.h”: No such file or directory
这个问题。
将下列添加到附加包含目录上
F:\coco2d-x\cocos2d-2.0-x-2.0.4\extensions;
.;
..\Classes;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx\include;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx\kazmath\include;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx\platform\win32;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx\platform\third_party\win32;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\cocos2dx\platform\third_party\win32\OGLES;
F:\coco2d-x\cocos2d-2.0-x-2.0.4\external;F:\coco2d-x\cocos2d-2.0-x-2.0.4\CocosDenshion\include;
%(AdditionalIncludeDirectories)
之后又遇到1>LINK : fatal error LNK1104: 无法打开文件“libcocos2d.lib”这个问题,将cocos2dx目录下的Debug.win32目录下的.dll文件和.lib文件
再编译运行即可。