LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-01-2005, 09:14 PM   #1
rollo
Member
 
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
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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
rollo
Member
 
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
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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
rollo
Member
 
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:33 AM.

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