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

Re: parse errors



On Mon, Apr 30, 2001 at 05:24:37PM +0200, cliff clifferson wrote:
> hi
> 
> i have a wired problem with the header files.
> my box has debian 2.2 kernel 2.2.18, and sometimes when i want to
> compile programms gcc gives me errors like that :
> 
> /usr/include/sys/socket.h:175: parse error before 'socklen_t'
> 
> or similar ones.
> 
> so i asked some people at CCCongress what that could be, but no one
> had an idea.
> I had that problem with different machines, different .h-files and
> different versions of debian. But i never saw anything like that on other
> distributions. So what could that be ??

I'm no programmer, but I did go through a problem like this just the other
day. It turned out that one of the program's .c files improperly set up the
include statements. Below is the original and my fix.  You might check your
files for something analogous.

/* get_atom_type.cc */


#ifdef sgi			<--- comment out this line
    #include <stdio.h>
    #include "get_atom_type.h"
#else				<--- comment out from here...
    extern "C"
    {
        #include <stdio.h>
        #include "get_atom_type.h"
    }
#endif				<--- to here!
...

HTH,

Kenward
-- 
It is not so very important for a person to learn facts.  For that he
doesn't really need a college education, for he can learn them from
books.  The value of an education in a liberal arts college is not the
learning of many facts but the training of the mind to thinking--something
that cannot be learned from books.     Albert Einstein



Reply to: