linux下cocos2d魔塔开发,以及编译问题

刚刚把我之前写Motalinux下编译运行

有很多错误啊,也不能说是错误,只是警告但是

Android.mk 里面有这个

-Werror


也就是编译选项的问题


man g++


找到这个

-Werror

Make all warnings intoerrors.


-Werror=

Make the specified warninginto an error. The specifier for a

warning is appended, forexample -Werror=switch turns the warnings

controlled by -Wswitch intoerrors. This switch takes a negative

form, to be used to negate-Werror for specific warnings, for

example -Wno-error=switchmakes -Wswitch warnings not be errors,

even when -Werror is ineffect.


The warning message for eachcontrollable warning includes the

option which controls thewarning. That option can then be used

with -Werror= and-Wno-error= as described above. (Printing of the

option in the warningmessage can be disabled using the

-fno-diagnostics-show-optionflag.)


Note that specifying-Werror=foo automatically implies -Wfoo.

However, -Wno-error=foo doesnot imply anything.


第一句我明白了,原来就是所有的警告都当错误处理的

Make all warnings into errors.


下面没看,肯定就是具体的用法,我觉得把所有的warning都改过了比较好

所以我改了varset no use 就是定义了没有使用我注释掉了

还有一个stirngformat 的问题,总之我也改过来了。


后来编译成功。

可以运行了


截图庆祝一下。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值