4
這些是什麼?它們是做什麼的?g ++的含義flags -Wall -W -Werror
-Wall -W -Werror
我在Ubuntu終端用此命編譯程序:
$ g++ -Wall -W -Werror main.cpp -o exec
誰能給我講解一下?
這些是什麼?它們是做什麼的?g ++的含義flags -Wall -W -Werror
-Wall -W -Werror
我在Ubuntu終端用此命編譯程序:
$ g++ -Wall -W -Werror main.cpp -o exec
誰能給我講解一下?
-Wall
:啓用一組警告,實際上並非全部。
-W
:啓用額外的警告,建議使用-Wextra
代替它的含義相同
-Werror
:每個警告都被視爲錯誤。
查看GCC文檔: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options