Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Getting started / Installation Tutorial / Building modules

Building modules

Source package
The source package of the Open CASCADE Technology including the source files of samples and tools and the set of building procedures is available for self-dependent preparation binary files on UNIX and Windows platforms.

Building tools are delivered in the form of Visual C++ Projects for Windows platform and a Makefile procedure for Unix platform.

Description of the Directory Tree

data - This folder contains files in various formats for experiments with OCCT functionality
doc - This folder contains OCCT documentation;
doc/Overview - This folder contains OCCT Overview documentation;
doc/ReferenceDocumentation - This folder contains OCCT Reference documentation generated by Doxygen;
ros/adm/make - This folder contains files of Makefile procedure , which allow rebuilding OCCT on Unix platforms;
ros/adm/win32 - This folder contains Visual Studio workspace for Visual C++ 2005, 2008 and 2010, which allows rebuilding OCCT on Windows platform in 32 bit mode.
ros/adm/win64 - This folder contains Visual Studio workspace for Visual C++ 2005, 2008 and 2010, which allows rebuilding OCCT on Windows platform in 64 bit mode.
ros/drv - This folder contains source files generated by WOK (private header files and instantiations of generic classes);
ros/inc - This folder contains all OCCT header files;
ros/src - This folder contains OCCT source files. They are organized in folders, one per development unit;
Samples - This folder contains source files and building procedure for Standard samples of applications and Tutorial (c# and mfc samples are applicable only for Windows platform);

Common pre-requisites
Open CASCADE Technology is certified using STL implementation by the supported compilers. Nevertheless the source code can be rebuilt using other implementations (for example STLPort) but OPEN CASCADE S.A.S. did not undertake any certification actions on such implementations and therefore cannot guarantee reliable work with other implementations.

You need about 4 GB of free disk space to rebuild Open CASCADE Technology.

Before compilation, you need to build (or to install the binaries of) 3rd party libraries mentioned in Hardware and Software Requirements.

Rebuilding on Windows

Libraries (dll ,dlld ,lib and libd) and executable (exe) files built by MS Visual Studio projects on Windows platform, are now placed to the ros/win32/vc8, vc9 and vc10 correspondingly (ros/win64 for 64-bit) folder.

Before compilation, you must define a path to the header and library files of TclTk, Freetype, Ftgl, FreeImage, gl2ps and TBB. Fot this, use MS Visual Studio menu Tools/Option from Directories tab or edit env_build.bat file to define PRODUCTS_PATH variable.

For building Qt samples make sure that the path to Qt (QTDIR) has also been added.

gl2ps, TBB and FreeImage are optional products. To build Open CASCADE Technology with or without these products, use variable CSF_DEFINES to specify additional compiler macros (list separated by semicolons, or just semicolon if empty):
  • HAVE_TBB - use if you want to build OCCT with Intel TBB
  • HAVE_FREEIMAGE - use if you want to build OCCT with FreeImage
  • HAVE_GL2PS - use if you want to build OCCT with gl2ps

  • Building without gl2ps, TBB and FreeImage: set CSF_DEFINES=;
  • Building with gl2ps, TBB and FreeImage: set CSF_DEFINES=HAVE_TBB;HAVE_FREEIMAGE;HAVE_GL2PS

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, or vc10), the architecture (win32 or win64), the mode of libraries to use for execution (Debug or Release), and the path to the solution file.

Rebuilding on Windows with MS Visual Studio project files

ros/adm/win32 and ros/adm/win64 folder contain vc8, vc9 and vc10 folders with MS Visual Studio project files for MS VC 2005, 2008 and 2010 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.
  1. Foundation Classes (file FoundationClasses.sln)
  2. Modeling Data (file ModelingData.sln)
  3. Modeling Algorithms (file ModelingAlgorithms.sln)
  4. Visualization (file Visualization.sln)
  5. Application Framework (file ApplicationFramework.sln)
  6. Data Exchange (file DataExchange.sln)
  7. 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.

Rebuilding on Unix and Linux with autoconf, automake and libtool scripts
During the compilation by makefiles some Linux OS and on a station with NVIDIA video card you may experience problems because the installation procedure of NVIDIA video driver removes library included in package libMesaGL from directory /usr/X11R6/lib and places this library in directory /usr/lib. However, libtool expects to find the library in directory /usr/X11R6/lib, which causes compilation crash (See /usr/X11R6/lib/
We suggest making links:

ln -s /usr/lib/ /usr/X11R6/lib/
ln -s /usr/lib/ /usr/X11R6/lib/

Set the environment variables CC to an ANSI C compiler, and CXX to your C++ compiler. If you are using GNU GCC, you can skip this step. In many instances the same option must be passed to the link as well, do that by setting LDFLAGS.

Attention: Before configure it is necessary to launch build_configure script to generate files configure and

Now use the ./configure with the correct options as described below:

--with-tcl=/path-where-tcl-is-installed :
for example --with-tcl=/usr/lib

--with-tk=/path-where-tk-is-installed :
for example --with-tk=/usr/lib

--with-gl-include=/path-where-gl-included-are-installed :
for example --with-gl-include=/usr/X11R6/include if GL/gl.h is located in /usr/X11R6/include

--with-gl-library=/path-where-gl- library-is-installed :
for example --with-gl-library=/usr/X11R6/lib if is located in this directory

--with-xmu-include=/path-where-xmu-included-are-defined :
for example --with-xmu-include=/usr/X11/R6/include if /X11/Xmu/Xmu.h is located in /usr/X11R6/include

--with-xmu-library=/path-where-xmu-library-is-installed :
for example --with-xmu-library=/usr/X11R6/lib


for example –with-tbb-include =/usr/tbb/include if tbb.h is located in this directory


for example, –with-tbb-library=/usr/tbb/lib if and is located in this directory






--enable-static=yes if you want to generate static library
--enable-shared=no if you don't want to generate shared library by default only shared library are built.

--enable-debug=yes/no - building in debug mode (yes: set -g key of compiler).
--enable-production=yes/no - building in optimized mode (yes: set -O key of compiler).

Additional flags:

--disable-draw - allows OCCT building without Draw.

Building without optional products:

Open CASCADE technology will be built without optional products if you will not define the following options:

–with-tbb-include=, –with-tbb-library= (without tbb), --with-gl2ps= (without gl2ps) and --with-freeimage= (without freeimage)

If you want to build Draw, define the following flags:

--enable-draw=yes --with-tcl=/path-where-tcl-is-installed --with-tk=/path-where-tk-is-installed

Attention: 64-bit platforms are detected automatically.


The ./configure should be executed with the flags depending on the type of UNIX platform as described below:

flags="--with-gl-include=/usr/include --with-gl-library=/usr/lib"

flags="$flags --with-xmu-include=/usr/X11R6/include/X11"

flags="$flags --with-xmu-library=/usr/X11R6/lib"

flags="$flags --with-tcl=${TCLHOME}/lib"

flags="$flags --with-tk=${TCLHOME}/lib"

flags="$flags –with-tbb-include =/usr/tbb/include"

flags="$flags –with-tbb-library=/usr/tbb/lib"

flags="$flags --with-freetype=/usr/freetype-2.3.7"

flags="$flags --with-ftgl=/usr/ftgl-2.1.2"

flags="$flags --with-gl2ps=/usr/gl2ps-1.3.5"

flags="$flags --with-freeimage=/usr/freeimage-3.14.1"

flags="$flags --disable-debug --enable-production"

flags="$flags --enable-draw=yes”

./configure $flags --prefix=${INSTALL_DIR}

where ${INSTALL_DIR} is the folder where Open CASCADE Technology will be installed.

If configure exits successfully, you can build OCCT with make command.

make install command will install OCCT in usable form without any additional operations.


© OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map