Syntax errors in include files????
Jan Christiaan van Winkel
jc at atcmp.nl
Thu May 3 17:15:43 AEST 1990
In article <222 at dynasys.UUCP> jessea at dynasys.UUCP () writes:
>I'm getting all kinds of syntax errors from include files when I try
>to compile stuff - like times.h, types.h. Can anyone tell me why
>I'm getting syntax errors from my include files? I haven't done any
Suggestion: try running the C preprocessor alone. This may give you more info
on where exactly the problem is. Also, look for missing/extraneous semicolons,
comma's etc. just before including a file. Example:
suppose your last line before #include <sys/types.h> is:
typedef mytyp int /* no semicolon here */
Then the first non comment line in #include <sys/types.h> (something like
typedef uchar unsigned char;), will produce a syntax error. This is easily seen
in a CC -E:
typedef mytyp int
typedef uchar unsigned char;
Hope this helps you.. Good hunting!
JC
--
Jan Christiaan van Winkel Tel: +31 80 566880 jc at atcmp.nl
AT Computing P.O. Box 1428 6501 BK Nijmegen The Netherlands
More information about the Comp.lang.c
mailing list