問題描述
禁用被視為錯誤的警告(cc1.exe) (Disable warnings being treated as errors(cc1.exe))
我正在開發一個 brew 應用程序。在編譯應用程序以獲取 MOD 文件時,我不斷收到此錯誤
cc1.exe:警告被視為錯誤
我想禁用此警告。我用谷歌搜索了它,很多人說禁用 ‑werror
會有所幫助,但我不知道該怎麼做。編譯器是 CodeSourcery ARM。
參考解法
方法 1:
You need to remove ‑Werror
from CFLAGS
, CPPFLAGS
etc.; these are usually set in Makefile's or build scripts.
However, I'd strongly advice to fix the actual warnings instead, which will produce more stable and error‑free code.
方法 2:
Run this Command in Terminal to say, not to consider warning as error
make CFLAGS="‑Wno‑error=format‑truncation"
(by Sarim Sidd、Daniel Roethlisberger、Be Champzz)