gcc error

Rupert Wood me@rupey.net
Mon Jul 29 07:02:00 GMT 2002


Shahin wrote:

> when I am trying to compile simple  C file with headers errors
> are generated....
:
> /usr/include/libio.h:263: parse error before `size_t'

That's very odd - it looks like size_t hasn't been defined yet. This is
usually done in <sys/types.h> via <stddef.h> but these should be
included automatically by any other header files that need them. Try
adding:

    #include <stddef.h>

to the very top of your source.

However, this is a problem with your C library and not with GCC. (Or it
may be an interaction problem - the C library assumes something about
GCC or vice versa.)

I think libc6 has been obsoleted by glibc 2.x but I understand updating
a Linux C library is a fairly complex and nasty operation (and that
libc6 and glibc aren't binary compatible?). However, the C library and
compiler supplied together in a distribution *ought* to cooperate
properly.

Good luck,
Rup.



More information about the Gcc-help mailing list