Open Graph Drawing Framework
current version:
v.2015.05 (Baobab)

Installation (Windows / Visual Studio)

The following instructions assume that you are familiar with your operating system and development platform (IDE, compiler).

Recall that OGDF is a pure library, i.e., using OGDF is a two-step process: first, you have to build the library. Then you can use the library (by linking against it) within your own program.

Building OGDF

For installing OGDF on Windows with Visual Studio, proceed as follows (for different versions see Configuration Options below):

  • Download the OGDF package from here and unpack in the directory, where you want to install OGDF.
  • Build OGDF (Visual Studio 2010/2012/2013):
    1. Execute the python script to generate Visual Studio 2010 project files ogdf.vcxproj and coin.vcxproj, as well as a solution file ogdf.sln.
    2. Open the solution ogdf.sln with Visual Studio and build the projects.
  • Build OGDF (Visual Studio 2008):
    1. Execute the python script to generate Visual Studio 2008 project files ogdf.vcproj and coin.vcproj.
    2. Open these projects with Visual Studio 2008 and build them.

Configuration Options

You can adjust some configuration options by editing makeVCXProj.config (Visual Studio 2010 and later) or makeVCProj.config (Visual Studio 2008 and earlier) before executing the python script. This allows you to create projects for different versions of Visual Studio or building OGDF as a DLL. These options are explained in the .config files; here we discuss some interesting usage scenarios.

  • Visual Studio 2010/2012/2013: For choosing a different Visual Studio version (or compiler), you have to change the used platform toolset. E.g., for choosing Visual Studio 2012, you change the settings as follows:
#* Selects the Visual C++ compiler version
#* v120            Visual C++ 2013
#* v110            Visual C++ 2012
#* v100            Visual C++ 2010
#* v90             Visual C++ 2008
#* Windows7.1SDK   Visual C++ 2010 (Windows 7.1 SDK)
platformToolset = v110
  • For building OGDF as a DLL, set the DLL option to true (the option applies only to OGDF, since COIN is always build as static library, and if OGDF is build as DLL the COIN library is linked to the OGDF DLL):
#* Create a static library (false) or DLL (true)?
DLL = true
  • If you use a Visual Studio Express Edition, you have to disable OpenMP for both the OGDF and the COIN project, since the Express Editions do not support OpenMP:
#* Enable OpenMP Support for OGDF?
#* (Set to false for Visual Studio Express Editions!)
OpenMP = false
#* Enable OpenMP Support for COIN?
#* (Set to false for Visual Studio Express Editions!)
OpenMP = false
  • By default a solution file ogdf.sln is created; this can also be disabled by setting createSolution (in the GENERAL) section to false. This is useful if you have already set up your solution and you just want to reconfigure OGDF.
  • By default, OGDF is build with integrated COIN and ABACUS support; you can disable this by setting useCoin (in the COIN section) to false.
  • You can choose the default LP-solver for OGDF and ABACUS by setting the defaultSolver option in the COIN section (default is COIN's CLP, but you can also choose an external solver such as CPLEX or Gurobi). If you specify an external solver as default solver, it is not necessary to also specify it as external solver.
  • If you want to use an external solver (CPLEX or Gurobi), you can add it under externalSolvers; in this case, you also have to specify the include directory under solverIncludes. If you build OGDF as a DLL, you also have to specify the libraries that have to be linked (e.g., solverLibs_x64_release). The following example sets CPLEX as default solver:
#* Default solver (one of CLP, SYM, CPX, GRB)
defaultSolver = CPX

#* External solvers (separated by semicolon)
externalSolvers = CPX

#* Additional include directories (separated by semicolon)
solverIncludes = C:\Program Files\IBM\ILOG\CPLEX_Studio124\cplex\include\ilcplex

Compiling and Linking against OGDF

For the following explanation, we assume that you installed OGDF in the directory OGDF_INSTALL_DIR. If you want to use the ogdf library in your own projects, proceed as follows.

  1. Add the path to the OGDF header files to the include path (project properties → C++ → Additional include directories). This is the include directory of the OGDF installation which contains the directories coin and ogdf, so add OGDF_INSTALL_DIR\include .
  2. If you want to link against the Debug version of OGDF, add the preprocessor definition OGDF_DEBUG (project properties → C++ → Preprocessor → Preprocessor definitions).
  3. Add the path to ogdf.lib and coin.lib to the library path (project properties → Linker → Additional library directories).
    If you use the created Visual Studio Solution, use $(SolutionDir)$(Platform)\$(Configuration)\; otherwise use OGDF_INSTALL_DIR\$(Platform)\$(Configuration)\ .
  4. Add ogdf.lib;coin.lib; as additional libraries for the linker (project properties → Linker → Input → Additional dependencies).
  5. External solvers: If you use an additional solver (CPLEX, Gurobi), you also have to add the respective library as additional dependency.

Building the Documentation

It is also possible to create the documentation directly from the source files if you have Doxygen installed. To build the OGDF HTML documentation, call


in the doc subdirectory of the OGDF installation (or simply double-click on the file). The documentation will then be written to doc/html.

tech/installvcc.txt · Last modified: 2015/05/30 17:20 by stephan
This page is driven by DokuWiki