Open Graph Drawing Framework
current version:
v.2012.07 (Sakura)
     

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:

  • Download the OGDF package from here and unpack in the directory, where you want to install OGDF.
  • Build OGDF (Visual Studio 2010):
    1. Execute the python script makeVCXProj.py to generate a Visual Studio 2010 project file ogdf.vcxproj.
    2. Open this project with Visual Studio 2010 and build the project.
  • Build OGDF (Visual Studio 2008):
    1. Execute the python script makeVCProj.py to generate a Visual Studio 2008 project file ogdf.vcproj.
    2. Open this project with Visual Studio 2008 and build the project.

If you want to compile OGDF with another version of Visual Studio (e.g. VS 2012 or VS 2005), you can specify a different project template file in the GENERAL section of the configuration file. Available project templates can be found in the config subdirectory.

  • For VS 2010 and newer: Edit MakeVCXProject.config and proceed as described above for Visual Studio 2010.
[GENERAL]
#* File name of project template file
templateFile = config/ogdf.vcxproj.vs2010.template
  • For VS 2008 and older: Edit MakeVCProject.config and proceed as described above for Visual Studio 2008.
[GENERAL]
#* File name of project template file
templateFile = config/ogdf.vcproj.vs2008.template

The project templates discussed above will build OGDF as a static library. There are also project templates for building OGDF as a DLL (these templates start with ogdf.dll (e.g. config/ogdf.dll.vcxproj.vs2010.template). Please note that DLL projects can only be built in Release configurations.

Optional Features

Some algorithms in OGDF require additional LP-solver libraries. These algorithms will not be compiled by default. If you want to use them, you need to install

and switch compiling on by editing OGDF's configuration file (makeVCProject.config or makeVCXProject.config) and setting the variable useCoin to true. The [COIN] section of your config file should look like this:

[COIN]
useCoin = true                  # turn Coin-support on
coinIncl = C:/???/COIN/include  # path to Coin include-directory (adapt)
solver_name = COIN_OSI_???      # which LP-solver shall Coin use: use any of
                                #    COIN_OSI_CLP = Coin's own LP-solver
                                #    COIN_OSI_CPX = CPLEX solver
                                #    COIN_OSI_SYM = Coin's Symphony framework
solver_incl = C:/???/include    # path to the LP-solver's include-directory (adapt)

The compilation of OGDF does not require the actual libraries. Anyhow, for compiling your own program against OGDF, you have to give Visual C++ the according paths and specifications.

Please note: Since the current ABACUS version does not officially supports Windows, some branch-and-cut algorithms in OGDF can only be used with Linux/g++ at the moment. We hope that ABACUS will (again) support Windows/Visual Studio in the future.

Compiling and Linking against OGDF

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 directory of the OGDF installation which contains the directory ogdf.
  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. Link against OGDF as described below.
    Make sure to link the correct version for each configuration (e.g. win32/Debug, win32/Release etc.).
    • Visual Studio 2010: Add the path to ogdf.lib to the library path (project properties → Linker → Additional library directories) and add ogdf.lib as additional library for the linker (project properties → Linker → Input → Additional dependencies).
      Please note: In Visual Studio 2010, a dependency no longer automatically links the OGDF library to your program. You will need to specify the library path and ogdf.lib as described above.
    • Visual Studio 2008 and below: Make your project depending on the OGDF project to link against OGDF. Alternatively, you can directly link against ogdf.lib as described for Visual Studio 2010.
  4. Add Psapi.lib as additional library for the linker (project properties → Linker → Input → Additional dependencies).

Linking to OGDF and COIN

For linking OGDF with the COIN libraries, you need to compile the COIN libraries with the Multithreaded DLL threading model and for the same target platform as your project (win32/x64, Debug/Release). The .zip archive below contains the precompiled COIN libraries and header files that can be used with OGDF.

To build a program that shall link against OGDF and COIN, proceed as described above and do the following additional steps:

  1. Add the path to the COIN header files to the include path (project properties → C++ → Additional include directories).
  2. Add USE_COIN;COIN_OSI_CLP to the preprocessor definitions (project properties → C++ → Preprocessor → Preprocessor definitions).
  3. Add the path to the COIN libraries to the library path (project properties → Linker → Additional library directories). Make sure that you use the path to the libraries compiled for the same configuration and platform as your project.
  4. Add libClp.lib libCoinUtils.lib libOsi.lib libOsiClp.lib as additional libraries for the linker (project properties → Linker → Input → Additional dependencies).
  5. Build your project.

The steps described above assume that you want to use Osi's own LP-solver (CLP); if you want to use a different LP-solver (e.g. CPLEX) further steps are required (please consult corresponding LP-solver documentation). You will also have to use the correct LP-solver flag (COIN_OSI_CLP in the description above:

LP-solver preprocessor definition
Coin's CLP COIN_OSI_CLP
Coin's Symphony COIN_OSI_SYM
CPLEX COIN_OSI_CPX


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

build-ogdf-docs.bat

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: 2012/10/15 11:30 by mch
This page is driven by DokuWiki