- Ubuntu
- Package management
- here
Header file read path
Information about the read path of Ubuntu header files.
Header file for packages installed with apt
The header files for packages installed with apt are in "/ usr / include".
/ usr / include
Check the read path of the header file
The header file read path is written to the C preprocessor.
First, find out the path of the preprocessor used by gcc.
gcc -print-prog-name = cc1
The output is as follows.
/ usr / lib / gcc / x86_64-linux-gnu / 7 / cc1
When viewing the preprocessor version, the include path is displayed.
/ usr / lib / gcc / x86_64-linux-gnu / 7 / cc1 -v
The default header file read path is displayed.
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/7/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: / usr / lib / gcc / x86_64-linux-gnu / 7 / include / usr / local / include / usr / lib / gcc / x86_64-linux-gnu / 7 / include-fixed / usr / include