Cocos2dx Android在编译的时候格式出错例如(snprintf)

  在不同的平台上进行编译的时候,由于某些方法不是c++的标准库,因此经常会报出一下错误,比如格式错误,snprintf()win32和ios上是会有错,但是在android就会报出格式错误,只要在Application.mk上添加一句 APP_CFLAGS += -Wno-error=format-security 就会忽视格式错误

APP_STL := gnustl_static  
  
APP_CPPFLAGS := -frtti -DCOCOS2D_DEBUG=1 -std=c++11 -Wno-literal-suffix -fsigned-char  
APP_CFLAGS += -Wno-error=format-security
APP_PLATFORM := android-14
原文地址:https://www.cnblogs.com/jita/p/4068387.html