Cocos2d-x运行win32工程
环境vs2010,cocos2d-x 2.1.3
1 随便找个位置新建cocos2d工程
2 引入包含目录
工程(右键)--> properties -->C/C+ --> General --> Additional Include Directories
把
.;..\Classes;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;%(AdditionalIncludeDirectories)
修改为
.;..\Classes;D:\c\cocos2d\c213\cocos2dx;D:\c\cocos2d\c213\cocos2dx\include;D:\c\cocos2d\c213\cocos2dx\kazmath\include;D:\c\cocos2d\c213\cocos2dx\platform\win32;D:\c\cocos2d\c213\cocos2dx\platform\third_party\win32;D:\c\cocos2d\c213\cocos2dx\platform\third_party\win32\OGLES;%(AdditionalIncludeDirectories)
3 引入需要用到的库文件
工程(右键)--> properties -->Linker --> Input --> Additional Dependencies
把
libcocos2d.lib;opengl32.lib;glew32.lib;%(AdditionalDependencies)
改为
D:\c\cocos2d\c213\Debug.win32\libcocos2d.lib;D:\c\cocos2d\c213\Debug.win32\opengl32.lib;D:\c\cocos2d\c213\Debug.win32\glew32.lib;%(AdditionalDependencies)
也可以不设置,直接把几个库文件copy到自己工程的
Debug.win32
Release.win32
4 把相关dll文件放入工程的
Debug.win32
Release.win32
然后就可以build