James Joy
James Joy

Reputation: 196

Location of C header files in debian

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.

Upvotes: 3

Views: 19131

Answers (2)

paulsm4
paulsm4

Reputation: 121599

  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

Upvotes: 2

Dietrich Epp
Dietrich Epp

Reputation: 213268

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.

Upvotes: 8

Related Questions