Forward declaration of type "classname" not defined Compilation Error

Hi Folks,
While I am moving a project Database from VCS Simulator to Questasim 6.6.
I am Encountering the error for Forward declaration of type “classname” not defined.

i.e
Class are declared in one file and it is defined in other files.
But the same Database works absolutely fine with the VCS Simualtor.

How to solve this error without declaring the class in the where it is defined.

Forward type declarations must be defined in the same scopeas the typedef; it doesn’t matter if they are in separate files. If you are enclosing all your class definitions in a package, this should not be a problem and is the recommended solution. However, if you are compiling things in $unit, VCS and Questa treat separate files differently. By default, Questa treats each file on the command line as separate compilation unit scopes, whereas VCS treats all files on the command line as one compilation unit scope.

Hi Dave,
That was an useful info stating that Questa always compiles each file as a single scope compared to that of VCS