7f0572d200298947c9d1098421e59e595b0c0456
[occt.git] / dox / dev_guides / building / msvc.md
1 Building with MS Visual C++ {#occt_dev_guides__building_msvc}
2 ===========================
3
4 This file describes steps to build OCCT libraries from a complete source
5 archive on Windows with <b>MS Visual C++</b>. 
6
7 If you build OCCT from bare sources (as in Git repository) or do some 
8 changes affecting CDL files, you need to use WOK to re-generate header files
9 and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
10
11 Before building OCCT, you need to install the required third-party libraries; see
12 paragraph 1 of \ref occt_dev_guides__building for instructions.
13
14 1. Edit file *custom.bat* to define the environment: 
15
16    - *VCVER* -- version of Visual Studio (vc8, vc9, vc10, vc11 or vc12), 
17              and relevant *VCVARS* path
18    - *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
19    - <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
20    - CSF_OPT_* -- paths to search for includes and binaries of all used 
21                  third-party products
22
23 2. Launch *msvc.bat* to start Visual Studio with all necessary environment 
24    variables defined.
25
26    Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
27    Binaries are produced in *win32* or *win64* folders.
28
29 3. Build with Visual Studio
30
31    Note: If VTK was not installed on you computer and you are not interested in usage of 
32             OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw 
33             projects from process of compilation in the main menu  <b>Build / Configuration Manager</b>. 
34
35 To start DRAW, launch *draw.bat*.