-O Output_filename
Determine the name of the executable file is output_filename. If this option is not given, GCC gives the default executable filename a.out.
-C
Compile only, do not link to executable file, the compiler only generates. o as the target file of the suffix by the input. C source file.
-G
To generate the symbolic information necessary for debugging tools (GDB), you must add this option if you want to debug a compiled program.
-O
To optimize the compilation of the program, link, using this option, the entire source code will be compiled, linked process optimization process, so that the resulting executable can improve the execution efficiency, but, the speed of the compilation, link is correspondingly slower.
-o2
Better than-o optimized compilation, link, of course, the entire compilation, link process will be slower.
-ldirname
Add the directory indicated by DirName to the list of program header file directories.
-ldirname
Add the directory indicated by dirname to the directory list of the library file.
-lname
When linking, load the function library with the name "Libname.a", which is located in the System preset directory or in the directory determined by the-l option.
-static
Static link library files.
-wall
Generate all warning messages.
-W
Does not generate any warning messages.
-dmacro
Defining MACRO macros is equivalent to using #define MACRO in your program.
Original address: http://www.cnblogs.com/mikelin/archive/2010/07/15/1777858.html