The following syntax interpretes the source as a C file. gcc src.c (c extention) The following syntax interpretes the source as a C++ file. gcc src.C (capital C) gcc src.cpp (cpp extention) g++ src.cpp (g++ program called) The default output of gcc is a dynamically linked program. This means that it will have dependencies on certain libraries from the system. The alternative is a statically linked program which compiles all the code needed into the program. This option flag is (-static) and makes programs larger than a dynamically linked program. This would be a good option for boot floppys or programs where libraries may not be present on a system. To define somthing when compiling which will change the code of the program, use the -D option followed by the define (no spaces b/w -D and the define). /* file.c */ #ifdef SOMETHING code... #endif $ gcc file.c -DSOMETHING