angle bracket pattern
Header files enclosed by angle brackets, for example #include <file>
, are searched from standard system directories by default, and the exact search path depends on the target system, how GCC is configured, and where GCC is installed. cpp -v
The default search path can be viewed through the directive.
quote pattern
Header files enclosed in quotes, for example #include "file"
, are searched first from the current file’s directory, and then from the standard system directories.
Specify the search directory
With -Idir
command line options, you can specify a custom search directory.
For quote mode, after the current directory is searched, the directory specified by dir will be searched, and finally the standard system directory will be searched.
For angle bracket mode, the directory specified by dir is searched first, followed by the standard system directories.
More granular control over search directories
If you want to specify only the search path for quote patterns, you can use -iquote
this option. This option only applies to quote patterns. -I,-isystem,-idirafter
Applies to both.
Similar Posts:
- Git LS files displays the current file status
- Linux: Environment Variables C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, CPATH Common Error [How to Solve]
- zlib.h:no such file or directory
- fatal error C1010: unexpected end of file while…
- GCC refers to math. H header file, and there are some errors such as undefined reference to ` POW ‘when compiling
- ImportError: cannot import name ‘patterns’
- GVIM configuration file (_ User defined configuration (no plug-in) record of vimrc
- TS eslint angle bracket Error: Parsing error: Identifier expected
- LIBRARY_ Path and LD_ LIBRARY_ The difference of path environment variable
- [Solved] Cannot Open “gl/glut.h” File Error: No such file or directory