Fatal Error in units initialisation?

I build a new project in VC ,using Viewer APPWizard.Compile and run,the program show:
Fatal Error in units initialisation.
I dont write even one stetement,yet.
and i am sure that the projec include D:\OPENCASCADE4.0\INC,D:\OPENCASCADE4.0\WINDOWS_NT\LIB,and #include
.
then,Anything else should I need to config?

BTW:I have reinstall win2000,and the OpenCascade4.0 have been install in the former system,and I set the path to it in the newer system.I can run the samples.
Is there anything should I config more?

Thanks a lot!

Barbara's picture

Verify the following environment variable :
CSF_UnitsDefinition and CSF_UnitsLexicon

If they are defined, they should be defined as following :

CSF_UnitsDefinition=D:\OPENCASCADE4.0\src\UnitsAPI\Units.dat
D:\OPENCASCADE4.0\src\UnitsAPI\Lexi_Expr.dat

If they are not defined , the following environment variable CASROOT is mandatory :

CASROOT=D:\OPENCASCADE4.0

Goodnight's picture

Thanks a lot.I got it!