Skip to content

Build on Windows with MSVC

RainerKuemmerle edited this page Jul 5, 2012 · 2 revisions

Preparation

If you want to use the GUI of g2o

Configuring with cmake

  • Create a folder called "build" below the g2o source folder
  • Start cmake and select the source folder of g2o and the build folder created in the first step
  • Hit configure, select the appropriate Visual Studio Version, and click finish.
  • cmake will probably complain about missing Eigen. Set the variable G2O_EIGEN3_INCLUDE to the folder containing Eigen.
  • Hit configure to re-run the cmake configuration with the correct location for Eigen.
  • cmake should run through without errors and after hitting generate the Visual Studio solution is created

If QGLViewer is available, then set the variables QGLVIEWER_INCLUDE_DIR and QGLVIEWER_LIBRARY.

Compilling with msbuild

msbuild g2o.sln /p:Configuration=RelWithDebInfo /maxcpucount

Clone this wiki locally