Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is stddef.h?

197 views
Skip to first unread message

U.V. Ravindra

unread,
May 10, 2000, 3:00:00 AM5/10/00
to


Doesn't Linux come with a <stddef.h>?

I am trying to port some code from Solaris to Linux (Alpha,
if that matters), and one of my files tries to include
<stddef.h>, which I can't find on the system.

Does a standard distribution of Linux (whatever that may
mean) include <stddef.h> or not?

Thanks,
Ravindra.


Sent via Deja.com http://www.deja.com/
Before you buy.

Vincenzo Tibullo

unread,
May 10, 2000, 3:00:00 AM5/10/00
to
In my RedHat 6.0 it is located in
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include,
and this directory is looked up by the compiler
automatically, so you don't have to put -I/usr/.../include
in your CFLAGS.

The man page for gcc says:

/usr/include standard directory for #include files
LIBDIR/include standard gcc directory for #include files


Bye.


U.V. Ravindra wrote in message <8fahd7$mgn$1...@nnrp1.deja.com>...

Will Dyke

unread,
May 10, 2000, 3:00:00 AM5/10/00
to
"U.V. Ravindra" wrote:
>
> Doesn't Linux come with a <stddef.h>?
>
> I am trying to port some code from Solaris to Linux (Alpha,
> if that matters), and one of my files tries to include
> <stddef.h>, which I can't find on the system.
>
> Does a standard distribution of Linux (whatever that may
> mean) include <stddef.h> or not?

$ locate stddef.h
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
/usr/lib/bcc/include/stddef.h
/usr/src/linux-2.2.12/include/linux/stddef.h
/usr/i386-glibc20-linux/include/linux/stddef.h

So Linux (or at least Redhat 6.1 and almost certainly almost any
other distribution) comes with stddef.h, it's just a matter of
ensuring that your compiler knows where to find it. What compiler
are you using? If it's not gcc, you may experience problems.
If it is, I'd suggest having a look through the gcc info pages
to determine how to ensure that gcc knows where to look.

HTH
Will Dyke

--
Manchester Visualization Centre
http://www.man.ac.uk/MVC/students/will
Manchester Computing mailto:will...@man.ac.uk
Oxford Road Tel: +44 161 275 6945
Manchester M13 9PL

0 new messages