码迷,mamicode.com
首页 > 移动开发 > 详细

mac cocos2dx android

时间:2017-04-15 18:04:24      阅读:334      评论:0      收藏:0      [点我收藏+]

标签:round   deb   compile   creat   bsp   host   lin   nbsp   mpi   

1.

localhost:proj.android mxhd4$ ./build_native.sh 

报错

Compile++ thumb  : cocosdenshion_static <= SimpleAudioEngine.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp: In constructor ‘CocosDenshion::SimpleAudioEngine::SimpleAudioEngine()‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp:159:2: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/SimpleAudioEngine.o] Error 1
make: Leaving directory `/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android‘

解决方法:vi  /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp

      line :159 凝视

2.

localhost:proj.android mxhd4$ ./build_native.sh 

报错

Compile++ thumb  : cocosdenshion_static <= SimpleAudioEngine.cpp
Compile++ thumb  : cocosdenshion_static <= OpenSLEngine.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In function ‘bool initAudioPlayer(AudioPlayer*, char const*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In member function ‘void OpenSLEngine::createEngine(void*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:324:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/opensl/OpenSLEngine.o] Error 1
make: Leaving directory `/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android‘

  解决方法:vi /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp

  line:324:凝视

3.

localhost:proj.android mxhd4$ ./build_native.sh

报错

Compile++ thumb  : cocosdenshion_static <= OpenSLEngine.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In function ‘bool initAudioPlayer(AudioPlayer*, char const*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
Compile++ thumb  : cocosdenshion_static <= SimpleAudioEngineOpenSL.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp: In member function ‘bool SimpleAudioEngineOpenSL::initEngine()‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp:41:5: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/opensl/SimpleAudioEngineOpenSL.o] Error 1

 解决方法:vi /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp:

  line:41:凝视


4.

localhost:proj.android mxhd4$ ./build_native.sh

Compile++ thumb  : cocos2dx_static <= CCCommon.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLog(char const*, ...)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors

make: *** [obj/local/armeabi/objs-debug/cocos2dx_static/platform/android/CCCommon.o] Error 1

 解决方法:vi /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp

  line:44:凝视


5.

将res    Icon.png拷贝到项目对应文件夹中,

将cocos2dx/platform/android/java/org文件夹复制一份到项目project的src对应文件夹中

buildpath  remove Android Dependency

技术分享


技术分享

mac cocos2dx android

标签:round   deb   compile   creat   bsp   host   lin   nbsp   mpi   

原文地址:http://www.cnblogs.com/zsychanpin/p/6714975.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!