System Environment Variables
To run any Open CASCADE Technology application you need to set the environment variables.
You can define the environment variables with env.bat script located in the OpenCACADE<version_number>/ros folder.
The additional environment settings necessary for compiling OCCT libraries and samples by Microsoft Visual Studio can be set using script env_build.bat located in the same folder. This script accepts two arguments: the version of Visual Studio (vc8, vc9, or vc10) to be used, and the architecture (win32 or win64). You might need to edit this script to correct the paths to third-party libraries if they are installed on your system in a non-default location.
Script msvc.bat can be used with the same arguments for immediate launch of Visual Studio for (re)compiling OCCT.
You can define the environment variables with env.ksh or env.csh script located in the OpenCACADE<version_number>/ros folder of the source package.
|
CASROOT
is used to define the root directory of Open CASCADE Technology; MMGT_OPT if set to 1 (default), memory manager performs optimizations as described below; if set to 2, Intel ® TBB optimized memory manager is used; if 0, every memory block is allocated in C memory heap directly (via malloc() and free() functions). In the latter case, all other options except MMGT_CLEAR and MMGT_REENTRANT are ignored; MMGT_CLEAR if set to 1 (default), every allocated memory block is cleared by zeros; if set to 0, memory block is returned as it is; MMGT_CELLSIZE defines the maximal size of blocks allocated in large pools of memory. Default is 200; MMGT_NBPAGES defines the size of memory chunks allocated for small blocks in pages (operating-system dependent). Default is 10000; MMGT_THRESHOLD defines the maximal size of blocks that are recycled internally instead of being returned to the heap. Default is 40000; MMGT_MMAP when set to 1 (default), large memory blocks are allocated using memory mapping functions of the operating system; if set to 0, they will be allocated in the C heap by malloc(); MMGT_REENTRANT when set to 1, all calls to optimized memory manager will be secured against possible simultaneous access from different execution threads. This variable should be set in any multithreaded application that uses optimized memory manager (MMGT_OPT=1) and has more than one thread potentially calling OCCT functions. Default is 0; Special note: for applications that use OCCT memory manager from more than one thread, on multiprocessor hardware, it is recommended to use options MMGT_OPT=2 and MMGT_REENTRANT=1.
CSF_LANGUAGE
is required to define the default language of messages; CSF_StandardLiteDefaults
is required in order to maintain OCCT Persistence mechanism to make possible
any open/save operations with Lite OCAF documents; CSF_XmlOcafResource - is required in order to set the path to XSD resources, which defines XML grammar. As part of XML persistence support, these definitions can be used by end users in XML validators or editors, together with persistent XmlOcaf documents; CSF_MIGRATION_TYPES is required in order to read documents that contain old data types, such as TDataStd_Shape. TCLLIBPATH,
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY
are required to allow work with DRAW and WOK; set PATH=%CASROOT%\win32\vc8\bin;%CASROOT%\..\3rdparty\win32\tcltk\bin; ;%CASROOT%\..\3rdparty\win32\tbb\bin;%CASROOT%\..\3rdparty\win32\gl2ps\bin; %CASROOT%\..\3rdparty\win32\ftgl\bin;%CASROOT%\..\3rdparty\win32\ftgl\freeimage;%PATH% set
CSF_LANGUAGE=us set
CSF_XCAFDefaults=%CASROOT%\src\StdResource Example: set OS_NAME=`uname` if ( $?PATH ) then setenv PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/../3rdparty/$OS_NAME/tbb/bin: $CASROOT/../3rdparty/$OS_NAME/gl2ps/bin:$CASROOT/../3rdparty/$OS_NAME /ftgl/bin: CASROOT/../3rdparty/$OS_NAME /freeimage/bin:$CASROOT/$OS_NAME/bin:$PATH else setenv PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/../3rdparty/$OS_NAME/tbb/bin: $CASROOT/../3rdparty/$OS_NAME/gl2ps/bin:$CASROOT/../3rdparty/$OS_NAME /ftgl/bin: CASROOT/../3rdparty/$OS_NAME /freeimage/bin:$CASROOT/$OS_NAME/bin endif if ( $?LD_LIBRARY_PATH ) then setenv LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib: $CASROOT/../3rdparty/$OS_NAME/tbb/lib:$CASROOT/../3rdparty/$OS_NAME/gl2ps/lib: $CASROOT/../3rdparty/$OS_NAME /ftgl/lib: CASROOT/../3rdparty/$OS_NAME /freeimage/lib:$CASROOT/$OS_NAME/lib:$ LD_LIBRARY_PATH else setenv LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib: $CASROOT/../3rdparty/$OS_NAME/tbb/lib:$CASROOT/../3rdparty/$OS_NAME/gl2ps/lib: $CASROOT/../3rdparty/$OS_NAME /ftgl/lib: CASROOT/../3rdparty/$OS_NAME /freeimage/lib:$CASROOT/$OS_NAME/lib endif setenv
TCLHOME $CASROOT/../3rdparty/$OS_NAME/tcltk |