标签:style class blog code http ext
依赖包含:
libx11-dev libxmu-dev libglu1-mesa-dev libgl2ps-dev libxi-dev g++ libzip-dev libpng12-dev libcurl4-gnutls-dev libfontconfig1-dev libsqlite3-dev libglew*-dev libssl-dev
$ cd cocos2d-x-3.1.1 $ cd build $ ./install-deps-linux.sh
2.依赖安装完毕后,进入build文件夹,运行cmake命令生成makefile文件
$ cd build $ mkdir linux-build $ cd linux-build $ cmake ../..
3.cmake成功结束后,在build/linux-build文件夹下会生成非常多文件
运行make编译
make
假设正确编译将在build/linux-build/bin/cpp-tests/文件夹下生成project
4.执行cpp-tests,验证编译成功
$ cd bin/cpp-tests/ $ ./cpp-tests
$ python install.py安装中会显示console安装的路径,比如
cocos new project名 -l 语言 -p 包名 -d 路径
比如
cocos new Game1 -p com.games.demo -l cpp -d /home/liyuhen/projects
6.切换到project路径下,编译并运行
cocos run -p linux
linux 下cocos2dx-3.3.1环境搭建,布布扣,bubuko.com
标签:style class blog code http ext
原文地址:http://www.cnblogs.com/zfyouxi/p/3807452.html