Results 1 to 7 of 7
i want to know the path of the header files of C.
eg where is stdio.h is actually stored. is it in / or /bin or /home.
how do i ...
- 07-23-2009 #1
Path of Headers
i want to know the path of the header files of C.
eg where is stdio.h is actually stored. is it in / or /bin or /home.
how do i open the header file to glance through it's contents?
am using fedora 9
- 07-23-2009 #2
It is most certainly in / as this is where the whole filesystem resides

/bin is for binary system programs, so it is likely not to be found there.
/home is where the users store their private data.
It may be somewhere under /usr
Try
"find /usr -name stdio.h"
On my system the file is in /usr/include/Debian GNU/Linux -- You know you want it.
- 07-23-2009 #3
I think it's in /usr/include in all systems. And you open individual headers with less or any text editor.
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 07-23-2009 #4
I'm moving this to a more appropriate forum.
But in any event, indeed. C header files are stored in /usr/include, but be aware that the standard library is very complicated. Their header files are pretty difficult to read. But all header files will be somewhere in there. For instance, the file "sys/linux.h" is stored at /usr/include/sys/linux.h.
The binaries that store the actual machine code for the files is stored in /usr/lib/. For instance, the standard libc is /usr/lib/libc.so, and the math libraries are /usr/lib/libm.so.DISTRO=Arch
Registered Linux User #388732
- 07-24-2009 #5"I'm just a little old lady; don't try to dazzle me with jargon!"
- 07-26-2009 #6
The include files being in /usr/include is part of the Filesystem Hierarchy Standard.
Concerning /lib:
Concerning /usr/lib:/lib : Essential shared libraries and kernel modules
Purpose
The /lib directory contains those shared library images needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin
/usr/lib : Libraries for programming and packages
Purpose
/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts.
Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory.
- 07-26-2009 #7
@hazel: Interesting. When I was last running Ubuntu to do some work for a class (this was in the spring), libc.so was in /usr/lib, and the one with debug symbols was in /usr/lib/debug.
There tends to be a lot of confusion about subdirectories of / and subdirectories of /usr, and in my experience, it can tend to vary a great deal between different distros. But now that I think about it, you are right, and I would expect libc.so to have been in /lib, so you're not relying on the /usr mountpoint.DISTRO=Arch
Registered Linux User #388732


Reply With Quote
