Location of C header files in debian
Solution 1
The system headers are in /usr/include
and the headers for user-installed packages are in /usr/local/include
.
But you only should put headers there if you are writing a library which other projects will use. Otherwise, you should use the -I
flag for your compiler to specify the location of additional header file search paths.
Solution 2
Typically in /usr/include
It wouldn't hurt to run a command like this to make sure you've got the "basics" like compiler and standard headers:
apt-get install build-essential
Failing all else, you can also do a "find". For example:
find / -name stdio.h -print 2> /dev/null
James Joy
Updated on June 04, 2022Comments
-
James Joy almost 2 years
Where does debian stores C header files like
stdio.h
,string.h
etc? I am working on a project and I need to add a header file to the location but I couldn't locate it anywhere.