Programming _ gcc common command line list

Source: Internet
Author: User
Programming _ gcc common command line list-general Linux technology-Linux programming and kernel information, the following is a detailed description. -O FILE
Specifies the output file name. This option is not required during compilation into the target code. If FILE is not specified, the default FILE name is a. out.

-C
Compile only without Link

-DFOO = BAR
Define the pre-processing macro FOO in the command line, and its value is BAR

-IDIRNAME
Add DIRNAME to the search directory list of the header file

-LDIRNAME
Add DIRNAME to the search directory list of the library file. By default, gcc only links to the shared library.

-Static
Link the static library, that is, execute the static Link

-LFOO
Link to the function library named libFOO

-G
Include standard debugging information in executable programs

-Ggdb
Only GNU debugger can be included in an executable program so that up to two other items are information.

-O
Optimize compiled code

-ON
Specify the code optimization level as N, o <= N <= 3

-Ansi
Standard Syntax of ANSI/iso c is supported to cancel parts that conflict with the standard in GNU syntax extension.
(But this option does not guarantee the generation of ANSI compatible code)

-Pedantic
All warnings listed in ANSI/iso c are allowed

-Pedantic-errors
All errors listed in ANSI/iso c standards allowed

-Traditional
Supports Kernighan & Ritchie C syntax (for example, defining a function using a legacy syntax). It does not matter if you do not know the meaning of this option.

-W
Disable all warnings. Do not use this option.

. Wall
All useful warnings that can be provided by gcc can be issued, or the specified warning can be marked with-W (warning ).

-Werror
Converts all warnings to errors to abort the compilation process when a warning occurs.

-MM
Output a make-compatible list

-V
Displays the commands used in each step of the compilation process.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.