< Day Day Up > |
If you elected to install the development tools package when you installed Fedora Core (or perhaps later on, using RPM, or other package tools), you should have the GNU C compiler (gcc). Many different options are available for the GNU C compiler, and many of them are similar to those of the C and C++ compilers that are available on other Unix systems. Table 32.1 shows the important switches for gcc. You can look at the man page or information file for gcc for a full list of options and descriptions
NOTE Fedora Core always includes a recent release of gcc, but newer versions of gcc appear from time to time. You should be aware that if you use gcc to develop programs for earlier versions of Linux, your programs might not load or run because of software library incompatibilities. You can always install an older version of gcc and compatible development libraries to support building programs that work with older versions of Linux. These problems can occur because older and newer versions of software libraries might have different ideas about how standard routines are used. When you build a C program using gcc, the compilation process takes place in several steps:
NOTE Most C programs compile with a C++ compiler if you follow strict ANSI rules. For example, you can compile the standard hello.c program (everyone's first program) with the GNU C++ compiler. Typically, you name the file something like hello.cc, hello.C, hello.c++, or hello.cxx. The GNU C++ compiler accepts any of these names. |
< Day Day Up > |