刚刚把我之前写Mota到linux下编译运行
有很多错误啊,也不能说是错误,只是警告但是
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 的问题,总之我也改过来了。
后来编译成功。
可以运行了
截图庆祝一下。