VS2010中创建cocos2dx项目

首先编辑cocos2dx目录下的[X:\cocos2dx\template\msvc\CCAppWiz.win32\Scripts\1033\]“default.js”文件,将Compiler settings的文件引用路径都换成绝对路径如下:

// Compiler settings
var CLTool = config.Tools('VCCLCompilerTool');

// Additional Inlcude Directories
var strAddIncludeDir = '.;..\\Classes';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx\\include';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx\\kazmath\\include';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx\\platform\\win32';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx\\platform\\third_party\\win32';
strAddIncludeDir += ';E:\\cocos2dx\\cocos2dx\\platform\\third_party\\win32\\OGLES;E:\\cocos2dx\\external;E:\\cocos2dx\\CocosDenshion\\include';

然后执行根目录下的“install-templates-msvc.bat”批处理,接着打开VS2010,新建项目C++中就可看到cocos2dx项目了,填写好项目名称和地址一路默认就好了

最后编译运行项目,可能会出现找不到相关引用库,这时只要将cocos2dx中“Debug.win32”目录中后缀名名lib和dll的文件复制到新建项目的对应目录既可

posted @ 2013-05-29 11:54  BicycleBoy  阅读(2347)  评论(0编辑  收藏  举报