linux基础学习之 GCC
2016-04-20 12:21
429 查看
GCC
gcc [-c|-S|-E] [-std=standard]
[-g] [-pg]
[-Wwarn...] [-pedantic]
[-Idir...] [-Ldir..]
[-Dmacro[=defn]...] [-Umacro]
[-foption...] [mmachine-option...]
[-o output] [@file] infile...
-v Display the programs invoked by the compiler
-### Like -v but options quoted and commands not executed
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-c Compile and assemble, but do not link
-o <file> Place the output into <file>
--help Display this information
--target-help Display target specific command line options
--help={target|optimizers|warnings|params|[^]{joined|separate|undocumented}}[,...]
Display specific types of command line options
-c compile or assemble the source files,but do not link.the linking stage is not done.
-s stop after the stage of compilation proper;do not assemble.
-E stop after the preprocessing stage;do not run the compiler proper.
-o file place output in file.
-v print the commands executed to run the stages of compilation.
-w inhibit all warning messages
-Werror make all warnings into errors.
-g produce debugging information in the operating system's natie format.
-pg generate extra code to write profile information suitable for the analysis program
gprof. you must use this option when compiling the source files you want data anout , and
you must also use it when linking.
-ftime-report makes the compiler print some statistics about the time consumed by each
pass when it finishes.
-fmem-report makes the compiler print some statistics about permanent memory allocation
when it finishes.
-I dir add the directory dir to the list of directory to be seachered for header files.
-M instead of outputing the result of preprocessing , output a rule suitable for make
describing the dependencies of the main source file.
-MM like -M but do not mention header files that are found in system header
directories, nor header files that are included,directly or indirectly,from such a header.
-l library seacher the library named library when linking.
gcc [-c|-S|-E] [-std=standard]
[-g] [-pg]
[-Wwarn...] [-pedantic]
[-Idir...] [-Ldir..]
[-Dmacro[=defn]...] [-Umacro]
[-foption...] [mmachine-option...]
[-o output] [@file] infile...
-v Display the programs invoked by the compiler
-### Like -v but options quoted and commands not executed
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-c Compile and assemble, but do not link
-o <file> Place the output into <file>
--help Display this information
--target-help Display target specific command line options
--help={target|optimizers|warnings|params|[^]{joined|separate|undocumented}}[,...]
Display specific types of command line options
-c compile or assemble the source files,but do not link.the linking stage is not done.
-s stop after the stage of compilation proper;do not assemble.
-E stop after the preprocessing stage;do not run the compiler proper.
-o file place output in file.
-v print the commands executed to run the stages of compilation.
-w inhibit all warning messages
-Werror make all warnings into errors.
-g produce debugging information in the operating system's natie format.
-pg generate extra code to write profile information suitable for the analysis program
gprof. you must use this option when compiling the source files you want data anout , and
you must also use it when linking.
-ftime-report makes the compiler print some statistics about the time consumed by each
pass when it finishes.
-fmem-report makes the compiler print some statistics about permanent memory allocation
when it finishes.
-I dir add the directory dir to the list of directory to be seachered for header files.
-M instead of outputing the result of preprocessing , output a rule suitable for make
describing the dependencies of the main source file.
-MM like -M but do not mention header files that are found in system header
directories, nor header files that are included,directly or indirectly,from such a header.
-l library seacher the library named library when linking.
相关文章推荐
- CentOS只能获取IP6地址不能获取IP4地址
- Linux下获取公网IP地址
- 清除Linux缓存
- CentOS编译安装gcc
- linux使用心得
- linux记录篇
- linux sort 多字段排序
- linux磁盘列阵和文件系统
- centos6设置静态IP
- linux下无法删除文件的原因
- 【linux学习笔记】在ubuntu下使用QT Cmake支持C++11
- 【linux学习笔记】在ubuntu下使用QT Cmake支持C++11
- Linux makefile 教程
- Linux内核分析:期中总结
- Linux常用命令
- 20个Linux服务器性能调优技巧
- kali linux软件源
- linux开启user_cmd功能记录用户所有操作指令到log message
- 基于Linux的智能家居的设计(3)
- mac系统下使用Vmwear安装red hat linux