In a Nutshell
By OGDF Team
Team & Contact
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.
For installing OGDF on Windows with Visual Studio, proceed as follows:
makeVCXProj.pyto generate a Visual Studio 2010 project file
makeVCProj.pyto generate a Visual Studio 2008 project file
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
MakeVCXProject.configand proceed as described above for Visual Studio 2010.
[GENERAL] #* File name of project template file templateFile = config/ogdf.vcxproj.vs2010.template
MakeVCProject.configand 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
Please note that DLL projects can only be built in Release configurations.
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 (
makeVCXProject.config) and setting the variable
[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.
If you want to use the ogdf library in your own projects, proceed as follows.
OGDF_DEBUG(project properties → C++ → Preprocessor → Preprocessor definitions).
ogdf.libto the library path (project properties → Linker → Additional library directories) and add
ogdf.libas additional library for the linker (project properties → Linker → Input → Additional dependencies).
ogdf.libas described above.
ogdf.libas described for Visual Studio 2010.
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:
USE_COIN;COIN_OSI_CLPto the preprocessor definitions (project properties → C++ → Preprocessor → Preprocessor definitions).
libClp.lib libCoinUtils.lib libOsi.lib libOsiClp.libas additional libraries for the linker (project properties → Linker → Input → Additional dependencies).
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:
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
doc subdirectory of the OGDF installation (or simply double-click on the file). The documentation will then be written to