parse error
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Fri Jul 7 10:09:00 GMT 2000
> I am new to this list and gcc.
> I am trying to compile some C code and I am getting 'parse error' in
> standard .h files. I want to make a shared library out of it. Please find
> attached, the Makefile. The file named 'x' shows the errors that occured in
> the compilation process.
> The compilation goes fine with cc.
Venkat,
It is hard to tell what the problem is without having full
preprocessor output. It is usually a good idea to take the first
compilation error, and analyse it until you understand it.
Also, it would be easier to follow if you had quoted the command line
of gcc (adding the -v and --save-temps arguments), instead of sending
the Makefile.
In any case, the first error apparently is
> /usr/include/sys/time.h:328: parse error before `char'
If you have the same system as I do, this line would read
int utimes(const char *, const struct timeval *);
Now, it is confusing that there is an error, since there seems nothing
to be wrong here. However, I recommend to look at the preprocessor
output instead. With --save-temps, the preprocessor output will go
into a .i file. Look for utimes in it, and see whether there is
anything strange.
Regards,
Martin
More information about the Gcc-help
mailing list