G++ compiler flag -W -D explain

本文介绍了C++编译时的-W和-Wall选项的作用,-W用于显示可能的错误警告,而-Wall则显示所有警告。同时提到-D用于预定义宏,可以结合其他路径优化代码。此外,还提到了-g标志,它能为可执行文件插入更多源代码信息,便于调试。
摘要由CSDN通过智能技术生成

-W 显示警告,但是只显示编译器认为会出现错误的警告。
-Wall 显示all警告
在编译时, -W和-Wall选项一起使用!

-D means #define something as in C++ main code
-D sometimes can be added with some other paths useful for the code (executable)

("-g" compile flag for use with the debugger) Inserting the `g’ flag tells the compiler to insert more information about the source code into the executable than it normally would.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值