GNU C/C++ Compiler Command-Line Switches
If you loaded the development tools when you installed Linux (or later using RPM), you should have the GNU C/C++ compiler (gcc). Many different options are available for the GNU C/C++ compiler, and many of them match the C and C++ compilers available on other UNIX systems. Table 24.1 shows the important switches. Look at the man page or info file for gcc for a full list of options and descriptions.
Switch | Description |
---|---|
-x language | Specifies the language (C, C++, Java, and assembler are valid values). |
-c | Compiles and assembles only (does not link). |
-S | Compiles (does not assemble or link); generates an assembler code (.s) file. |
-E | Preprocesses only (does not compile, ... |
Get Red Hat® Linux® 7 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.