I am not clear now which files include which. Let me try to recapitulate this:
lexer.c
includesstr.h
andlexer.h
main.c
includeslexer.h
Is that right? In this case, main.c
cannot be compiled as, indeed, the definition of the string
type is missing.
As lexer.h
always requires str.h
to be included, it might be a good idea to out #include "str.h"
into this header file.