cocos2d-x 第一篇 环境搭建
官网:http://www.cocos2d-x.org/
下载一个稳定版的cocos2d-x
(网址:http://download.cocos2d-x.org/
Github Repository :https://github.com/cocos2d/cocos2d-x)
解压后
打开终端,进入cocos2d-x/tools/project-creator文件夹,运行
create-projects.py脚本,例如:
$ cd cocos2d-x/tools/project-creator
$ ./create-multi-platform-projects.py -p mygame -k com.your_company.mygame -l cpp
$ cd ../../projects/mygame
此时:
编译要求:
- Mac OS X 10.7+, Xcode 4.6+
- or Ubuntu 12.10+, CMake 2.6+
- or Windows 7+, VS 2012+
运行环境要求: - iOS 5.0+ for iPhone / iPad games
- Android 2.3+ for Android games
- OS X v10.6+ for Mac games
- Windows 7+ for Win games
进到projects/mygame/proj.ios_mac文件夹,双击HelloCpp.xcodeproj打开刚刚新建的工程,编译运行:
-