Tycoon
Tycoon

Reputation: 538

cc1plus: some warnings being treated as errors cocos2dx on ubuntu

Hi I'm new to cocos2dx on Ubuntu 12.04 while compiling cocos2dx samples using terminal getting

   /home/shiro/cocos2dx/cocos2d-x-2.1.4/cocos2dx/platform/android/CCCommon.cpp: In    function 'void cocos2d::CCLog(char const*, ...)':
  /home/shiro/cocos2dx/cocos2d-x-2.1.4/cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror=format-security]
  /home/shiro/cocos2dx/cocos2d-x-2.1.4/cocos2dx/platform/android/CCCommon.cpp: In function 'void cocos2d::CCLuaLog(char const*)':
  /home/shiro/cocos2dx/cocos2d-x-2.1.4/cocos2dx/platform/android/CCCommon.cpp:54:77:     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/cocos2dx_static/platform/android/CCCommon.o] Error 1
make: Leaving directory `/home/shiro/cocos2dx/cocos2d-x-2.1.4/samples/Lua/TestLua/proj.android'

when i import the same android project on eclipse, console displaying

/home/shiro/android-ndk-r9/bash /home/shiro/cocos2dx/cocos2d-x-2.1.4/samples/Lua/TestLua /proj.android/build_native.sh all 

Error: Cannot run program "/home/shiro/android-ndk-r9/bash": Unknown reason

 **** Build Finished ****

IF anybody know how to solve this issue please help, Thank you.

Upvotes: 0

Views: 2561

Answers (1)

florentbuisson
florentbuisson

Reputation: 546

See disable -Werror ini configure file and try removing -Werror in your Android.mk. If you can't find it anywhere try overriding it with -Wno-error

Upvotes: 1

Related Questions