Location of C header files in debian

16,564

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

  1. Typically in /usr/include

  2. 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

  3. Failing all else, you can also do a "find". For example:

    find / -name stdio.h -print 2> /dev/null

Share:
16,564
James Joy
Author by

James Joy

Updated on June 04, 2022

Comments

  • James Joy
    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.