[Gllug] OT - GNU compiler error
John Winters
john at sinodun.org.uk
Mon Apr 7 15:46:16 UTC 2008
John Winters wrote:
> Mick Farmer wrote:
>> Dear GLLUGers,
>>
>> I'm compiling a C program with the command line
>>
>> gcc -ansi -c search.c
>>
>> and get the error message
>>
>> search.c:5: error: duplicate `extern'
I've done a bit more research into this and it seems that gcc produces
this error if it encounters the word "extern" twice in quick succession.
You probably have an un-terminated declaration of some sort (missing
semi-colon?) at the end of zero.h
This minimal code will demonstrate the problem.
==== File zero.h ====
extern
==== File problem.c ====
#include "zero.h"
extern int debug;
john at knight:~/test$ gcc -ansi problem.c
problem.c:2: error: duplicate 'extern'
john at knight:~/test$
HTH
John
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list