VS2010中创建cocos2dx项目
2013-05-29 11:54
344 查看
首先编辑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的文件复制到新建项目的对应目录既可
// 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的文件复制到新建项目的对应目录既可
相关文章推荐
- VS2010下创建cocos2dx项目
- Cocos2dx在vs2010创建项目脚本出错
- vs2010无法创建cocos2dx项目
- cocos2dx 2.2.1创建项目
- 解决vs2010下不能创建项目及文件的问题
- cocos2dx2.2如何创建win32新项目
- c++ ActiveX基础1:使用VS2010创建MFC ActiveX工程项目
- VS2010创建项目失败
- 【Visual C++】vs2008/2005正确打开vs2010所创建项目的几种方法
- Cocos2D-X入门知识-windows上利用vs2010进行安装、项目创建v2.2.5
- cocos2dx 在VS2010编写,然后在ADT上编译android项目
- 二、小贝学习cocos2dx——python创建cocos2dx项目
- [ActiveX]使用VS2010创建MFC ActiveX工程项目
- VS2010中创建安装项目
- QUICK_COCOS2DX创建新项目
- cocos2dx 3.x 快速创建项目
- cocos2dx3.0 lua项目创建cpp文件时候不能导入extensions头文件时无法使用或报错
- c++ ActiveX基础1:使用VS2010创建MFC ActiveX工程项目
- Cocos2dx-3.1.1 探索之旅01----> 目录结构、新项目工程创建及运行
- cocos2dx 3.1.1 创建项目编译到android上运行