Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-01-2005, 09:14 PM   #1
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Rep: Reputation: 30
What are system header files?

Just trying to get a firm grasp of key concepts before attempting a kernel compile...

What are 'system header files'? Can't find a decent answer to this question.

According to the Linux Wiki, you need them installed along with the C compiler and make, whatever they are.
Old 07-01-2005, 09:20 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
If you've installed the kernel sources, you do have the system header files. The 'C standard library headers' are the headers containing functions provided by the standard c library (libc/glibc).
Old 07-02-2005, 06:13 PM   #3
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Thanks for that Matir. Still not sure exactly what a header is, but it seems it doesn't matter so that's alright.
Old 07-02-2005, 10:17 PM   #4
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
header files "*.h" files in c and c++ define the functions available for use by client programs.
they expose the interface to the user space library i guess you would say

now when you say system header files and talk about the kernel i assume you mean the kernel interface available through glibc.

these files are in /usr/include/linux and /usr/include/asm and are specific to glibc -- they are kernel header files from a kernel source package but specifically the ones used to compile glibc so they expose the kernel interface compiled into glibc that other user space programs can use. These files always stay the same and don't change when you change the kernel.

beyond that there are other header files that expose what would be called "system" as well to user space and come with glibc. These non standard c language functions also represent kernel interface and why some come in the kernel source and some come in glibc source is a mystery. glibc and the kernel form a kind of which came first the chicken or the egg kind of thing.
anytime the programmer is using functions that are from a lower level than the standard c or c++ functions they are using "system" functions.

the important thing to get is these files in /usr/include are different from your kernel source directory.
The kernel source directory contains the headers that describe kernel space as opposed to user space.
when you compile or write something that is actually a part of the kernel like a kernel module you use the kernel space headers and you have access to the inner nuts and bolts of the kernel and don't have to access the kernel through glibc.
Old 07-04-2005, 06:52 AM   #5
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Thanks for that, foo_bar_foo!

The whole thing makes a bit more sense now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C Header files Stephanie Linux - General 4 12-22-2007 09:07 AM
Including header files and source files for classes Feenix Programming 8 09-28-2005 10:53 AM
gcc header files and cpp files? EchO Linux - Software 3 03-01-2005 01:14 AM
Where are the C header files? Eddie283 Linux - Games 7 08-26-2004 12:46 PM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 02:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration