I'm doing a project in C with Flex and Bison, but I found an error during the compile.
Here is the error:
A_Sintactico.yy:186:6: error: conflicting types for ‘yyerror’
In file included from A_Sintactico.yy:3:0:
A_Lexico.l:15:8: note: previous declaration of ‘yyerror’ was here
extern yyerror(char*);
^
Code of yyerror in A_Sintactico.yy:
void yyerror(char* mens){
extern int numlin;
fprintf(stderr, "Error sintactico en la linea %i %s\n", numlin, mens);
}
Code of yyerror in A_Lexico.l
extern yyerror(char*);
What is happening?, Thanks!