I am writing a program using flex that takes input from a text file and splits them into some tokens like identifier, keywords, operators etc. My file name is test.l. I have made another hash table program which includes a file named SymbolTable.h . Is there any way to include this header file in my test.l file so that I can make some operations (for example: inserting the identifiers into the hash table)while reading the input? I have already tried to include it but when I try to compile using gcc lex.yy.c -lfl
, it generates an error message saying:
"fatal error: SymbolTable.h: No such file or directory."
Please help me on how to include the header file or in any other way I can do the desired operation I stated above.
SymbolTable.h
and later that the error saysSymbolInfo.h
. That sounds like you've put the wrong file name. It would be useful if you include in your answer so more details, including an excerpt from thetest.l
file where the header file is included. – rici