Search Path (The C Preprocessor)
c-programminggccpreprocessorbuild-system
Abstraction: GCC C preprocessor header include search path rules
Key points:
- Quote-form
#include "file"searches first relative to the current file's directory, then the standard system directories - Angle-bracket form
#include <file>searches only standard system directories by default -I dirflag adds a directory to the front of the search path for both forms-iquoteand-isystemprovide separate control over quote-form and system-header search pathscpp -v /dev/null -o /dev/nullprints the actual search path list for a given GCC installation-nostdincsuppresses all default system header directories, useful for OS kernels or bare-metal code
Connections: Gcc · C Programming · C Preprocessor