Open Graph Drawing Framework
current version:
v.2010.10 (Sassafras)
     

Installation (Linux/Mac OS X)

  • Download the OGDF package from here and unpack in the directory, where you want to install OGDF.
  • Build OGDF (gcc Compiler):
    1. Edit makeMakefile.config for your configuration (if necessary): check the [GENERAL] section. If you do not use Coin, the default parameters should be suitable.
    2. Execute makeMakefile.sh to generate a suitable Makefile.
    3. Call make to build the OGDF library (you may also call make debug to generate a debuggable version).

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 makeMakefile.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 = /???/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 = /???/include      # path to the LP-solver's include-directory (adapt)

If you want to use ABACUS as well, the [ABACUS] section of your config file should look like this:

[ABACUS]
useAbacus = true
abacusDef = -DABACUS_COMPILER_GCC
abacusIncl = /somewhere/abacus/include

The compilation of OGDF does not require the actual libraries. However, when compiling your own program with gcc against OGDF, you need to specify the according paths and settings!

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 (-I option of the gcc). 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 (-D option of the gcc).
  3. Link against OGDF library (-l option of the gcc)
    Make sure to link the correct version for each configuration (e.g. _debug/libOGDF.a, _release/libOGDF.a etc.).
  4. Link against the pthread library (-lpthread).

Linking to OGDF and COIN

For linking OGDF with the COIN libraries, you need to compile the COIN libraries for the same target platform as your project (x86/x86_64, Debug/Release). See https://projects.coin-or.org/Osi#BackgroundDownload for additional help.

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
  2. Add USE_COIN;COIN_OSI_CLP to the preprocessor definitions
  3. Link against libClp.lib libCoinUtils.lib libOsi.lib libOsiClp.lib in the <osi-install-dir>/lib directory
  4. 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

Build Documentation

It is also possible to create the source code documentation directly from the source files if you have Doxygen installed. You will also need to have LaTeX and Ghostscript installed so that Doxygen can create images from formulas. To build the OGDF HTML documentation, type

make doxy

in the root directory of the OGDF installation. The documentation will then be written to doc/html.

 
tech/installgcc.txt · Last modified: 2010/10/29 16:55 by karsten
This page is driven by DokuWiki