Building on Windows with MS Visual Studio project files
Before compilation, you must define a path to the header and library files of TclTk, Freetype, FreeImage, gl2ps and TBB. For this, use MS Visual Studio menu Tools/Option from Directories tab or edit custom.bat file.
gl2ps, TBB and FreeImage are optional products. To build Open CASCADE Technology with or without them, use variable CSF_DEFINES to specify additional compiler macros:
Examples of definition in custom.bat file:
Building without gl2ps, TBB and FreeImage:
set HAVE_FREEIMAGE=false
set HAVE_GL2PS=false
set HAVE_TBB=false
These definitions form the string set CSF_DEFINES= in env.bat file.
set HAVE_FREEIMAGE=true
set HAVE_GL2PS=true
set HAVE_TBB=true
These definitions form the string set CSF_DEFINES=HAVE_TBB;HAVE_FREEIMAGE;HAVE_GL2PS in env.bat file.
Use script msvc.bat located in the ros sub-folder of OCCT installation directory for launching MS Visual Studio in the environment configured for building OCCT libraries. The script accepts optional arguments: the version of Visual Studio to launch (vc8, vc9, vc10 and vc11), the architecture (win32 or win64), the mode of libraries to use for execution (Debug or Release), and the path to the solution file.
Libraries (dll ,dlld ,lib and libd) and executable (exe) files built by MS Visual Studio projects on Windows platform, are placed to the folders ros/win32/vc8, vc9, vc10 and vc11 correspondingly (or ros/win64 for 64-bit) folder.
Folder ros/adm/msvc contains folders vc8, vc9, vc10 and vc11 with MS Visual Studio project files for MS VC 2005, 2008, 2010 and 2012 correspondingly that can be used to rebuild Open CASCADE Technology in 32 or 64 bit mode.
Each of them describes and builds one library (.dll) or executable (.exe). They are designed to compile sources and to search header files in a directory structure created from downloaded archives. All these projects are gathered in workspaces corresponding to OCCT modules.
The workspaces are listed below and must be rebuilt in accordance with that order.
Below is the ordered list of workspaces to rebuild.
Foundation Classes (file FoundationClasses.sln)
Modeling Data (file ModelingData.sln)
Modeling Algorithms (file ModelingAlgorithms.sln)
Visualization (file Visualization.sln)
Application Framework (file ApplicationFramework.sln)
Data Exchange (file DataExchange.sln)
Draw (file Draw.sln)
Additionally a common MS Visual Studio solution file OCCT.sln is provided. This solution comprises all OCCT projects and can be used for (re)building a complete set of OCCT libraries or separate OCCT module in one instance of Visual Studio.