System Verilog: `define error while running with questa tool

In reply to mahesh_424:

Change your
`define
into a
parameter
. Text macros get compiled and used before parsing any SystemVerilog code, so they cannot be part of a package and later imported.

The reason it appears to work in one tool and not another is because of the way the tool treats files in compilation units.

See this reply and related links.