- Introduction to GNU C and C++ Compilers
- Installing GNU Compiler
- Compiling a Program
- Linking a program
- Assembling a Program
- Handling Warning and Error messages
- Include files
- Creating Libraries
- Standard Libraries
- Compiling Pascal Programs
- Compiling Fortran Programs
- Other Compilers
- References and Resources
3.7 Include files
During the compilation process, the compiler should know where include files will be located. This can be done in different ways. The compiler looks into some default locations when searching for include files and you have already seen in this chapter how to display that information. You can also use the –I command line switch with the gcc command to set additional paths to locate include files. The third method is the use of environment variables. Please see the environment variables section earlier in this chapter for more information.