[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc header problem



Sahin Haciguliyev <shahin@gateway.ege.edu.tr> writes:

> Hi,
> when I'm comping C file 
> there header error..
> Can smbd help me?
> 
> ========================
> shahin@gateway:~$ gcc -o myC myC.c
> In file included from /usr/include/stdio.h:57,from myC.c:1:
> /usr/include/libio.h:263: parse error before `size_t'
> /usr/include/libio.h:272: parse error before `size_t'
> /usr/include/libio.h:368: parse error before `_IO_sgetn'

<SNIP>

Useually, when I get these errors from system header files, it's because
I've made a syntax error in the file which includes them: forgot a closing
curly brace, or a semicolon after a class/struct/union definition, or
something like that.  Since you're including stdio.h on line 1, however,
this is somewhat less likely.

Check to make sure you don't have any stray characters before the include
directive.  (I think whitespace before the # and whitespace between the #
and the include is technically OK, but I tend not to use it.)

Failing that, something's wonky with your headers.  Try reinstalling
libc6-dev.  If *that* doesn't work, let's verify your compiler: try
compiling the following:

================== CUT HERE ===================
int write(int, const void *, unsigned);

int main()
{
    write(0, "Hello, world!", 13);
    return 0;
}
================== CUT HERE ===================

That should work without any syntax errors.  Let me know if that works.

Richard


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: