GCC的几个重要选项解释

52 篇文章 0 订阅
7 篇文章 0 订阅
-c  Compile or assemble code, but do not link
-c  编译或者汇编代码,但是不链接


-S  Stop after compiling, but do not assemble
-S  在编译之后停止,但不汇编

-E  Stop after preprocessing, but do not compile
-E  预处理后停止,但不编译

-o  Specifies the output filename to use
-o  指定输出文件的名称

-v  Display the commands used at each stage of compilation
-v  显示编译的每个阶段使用的命令

-std  Specifies the language standard to use
-std  指定要用的语言标准

-g  Produce debugging information
-g  产生调试信息

-pg  Produce extra code used by gprof for profiling
-pg  产生额外信息,被gprof用来做profilling

-O  Optimize executable code
-O  优化可执行代码

-W  Sets compiler warning message level
-W  设置编译器的警报级别

-pedantic  Issue mandatory diagnostics listing in the C standard
-pedantic  发出在C标准中列出的强制性诊断?

-I  Specify directories for include files
-I  指定文件包含的目录

-L  Specify directories for library files
-L  指定库目录

-D  Predefine macros used in the source code
-D  预定义在源代码中出现的宏

-U  Cancel any defined macros
-U  取消所有定义的宏

-f  Specify options used to control the behavior of the compiler
-f  指定用来控制编译器行为的选项

-m  Specify hardware-dependant options
-m  指定与硬件相关的选项


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值