linux_cocos2dx_环境搭建
来源:互联网 发布:mac怎么新建txt 编辑:程序博客网 时间:2024/06/10 19:12
我的windows崩溃了,各种烦,没办法,到linux下来搞cocos2d开发吧
首先下载了个cocos2d的源码2.2.1
用#表示cocos2d目录吧
然后unzip#.zip
在#目录下运行./make-all-linux-project.sh
于是生成#/lib/debug/..a ..so
但是
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidNodeCreateTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:256:49:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidNodeDeallocTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:308:49:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteCreateEmptyTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:365:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteCreateTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:419:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteDeallocTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:473:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
有个这个错误,所以编译就停止了
所以
#lib/release/... 好像没有生成
后来我在#目录下运行Makefile文件
生成了lib/release/...a..so
但是也是上面的错误
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidNodeCreateTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:256:49:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidNodeDeallocTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:308:49:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteCreateEmptyTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:365:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteCreateTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:419:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
../Classes/PerformanceTest/PerformanceAllocTest.cpp:In member function ‘virtual voidSpriteDeallocTest::initWithQuantityOfNodes(unsigned int)’:
../Classes/PerformanceTest/PerformanceAllocTest.cpp:473:51:error: format ‘%lu’ expects argument of type ‘long unsignedint’, but argument 2 has type ‘unsigned int’ [-Werror=format]
总之都是这个字符串format问题
error: format ‘%lu’ expectsargument of type ‘long unsigned int’, but argument 2 has type‘unsigned int’ [-Werror=format]
在Makefile里面的那一行改呢,我不清楚
下面看看能不能用python建立一个HelloWorld项目,看看能不能运行,因为之前的debugrelease下的链接文件都是生成了的,
只有在Sample/Cpp/...这个目录下的没有完全生成,可能就是一个编译选项的问题(我没有必要怀疑源代码吧?),
但是我没有找到哪里改。。。先不管。。。
用python创建项目
python#/tools/project-creator/create_project.py
这里我忘了怎么敲了
但是
提示非常给力
Usage: create_project.py -projectPROJECT_NAME -package PACKAGE_NAME -language PROGRAMING_LANGUAGE
Options:
-project PROJECT_NAME Project name, for example: MyGame
-package PACKAGE_NAME Package name, for example: com.MyCompany.MyAwesomeGame
-language PROGRAMING_LANGUAGE Major programing lanauge you want to used, should be [cpp | lua |javascript]
Sample 1: ./create_project.py -projectMyGame -package com.MyCompany.AwesomeGame
Sample 2: ./create_project.py -projectMyGame -package com.MyCompany.AwesomeGame -language javascript
./create_project.py -project HelloWorld-package com.boss.helloworld
-language cpp
然后cd到#/projects/HelloWorld/proj.linux
make 一下
cd #/projects/HelloWorld/proj.linux/bin
敲下./HelloWorld
运行成功
虽然有点小问题但是成功了一半了,上面一个问题留给以后解决!
- linux_cocos2dx_环境搭建
- 环境搭建
- 搭建环境
- 环境搭建
- 搭建环境
- 环境搭建
- 搭建环境
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- 环境搭建
- hadoop 文档搜集
- Installation Instructions for Intel® Hardware Accelerated Execution Manager
- android 判断ListView滚动到底部
- win7开放80端口
- linux 安装zabbix监控工具
- linux_cocos2dx_环境搭建
- AdvancED DOM Scripting【读书笔记】
- linux [转载]linux 命令行svn使用
- 查看APK中MD5签名的方法
- Hashtable用法
- Configuring VM Acceleration on Windows
- linux下cocos2d魔塔开发,以及编译问题
- Python操作Mysql实例代码
- tomcat部署多个项目,通过域名解析访问不同的网站