Forum Discussion
metaprogrammer
New Contributor
7 years agoSorry, I forgot to include STR definition. Assume you have a file 'defines.v', can be empty, does not matter, and a file 'main.v' with the following:
`define STR(a) `"a`"
`define PREFIX .
`define IPATH(a) `include `STR(`PREFIX/a)
`IPATH(defines.v)
Then, Quartus II will display two errors for the line 5:
Error (10108): Verilog HDL Compiler Directive error at main.v(5): missing Compiler Directive
Error (10096): Verilog HDL Compiler Directive error at main.v(5): incorrect use of predefined text macro "include" -- expected macro field ""filename""