Build on Windows

Gerbil was tested on Windows 7 (32bit and 64bit). We recommend to compile with 64 bit due to the image data typically being rather large and Windows 32bit programs only having 2 GB of RAM at their disposal.

The Gerbil code is now C++-11, and uses standard features which require Visual Studio 2013 or newer.

Earlier versions were also tested on Windows XP with Visual Studio 2008.

Please check the requirements and install all needed libraries before continuing.

Build Setup

You will probably have to build the boost libraries yourself. For CMake, OpenCV, Qt, TBB and GDAL convenient installers are available. Make sure to install the Qt libraries with Visual Studio support or build Qt yourself.

Make sure the Visual Studio version of your pre-built Qt package matches your local version or the program will crash! Qt packages matching specific compilers and architectures can be found here.

Use CMake as explained here for the following steps.

Step 1

Press “Configure” once. New variables and some error messages will pop up.

Step 2

Configure external dependencies by filling the following variables.

CMake Variable Explanation
BOOST_ROOT directory that contains boost, e.g. C:/boost_1_54_0
OpenCV_DIR build directory of OpenCV, e.g. C:/OpenCV/build
Qt5OpenGL_DIR lib/cmake/Qt5OpenGL within Qt build, e.g. C:/Qt5.6/msvc2013_64/lib/cmake/Qt5OpenGL
Qt5Widgets_DIR lib/cmake/Qt5Widgets within Qt build, e.g. C:/Qt5.6/msvc2013_64/lib/cmake/Qt5Widgets
TBB_ROOT_DIR directory where TBB was extracted, e.g. C:/tbb42_20130725oss
GDAL_INCLUDE_DIR the INCDIR of your gdal installation, e.g. C:/gdal-1.10.1/stage/include
GDAL_LIBRARY gdal_i.lib stub library, e.g. C:/gdal-1.10.1/stage/lib/gdal_i.lib

GDAL support is optional. If you do not need GDAL, you don’t need to fill in the last two variables.

Step 3

Press configure again and change the configuration until the “Generate” buttons becomes enabled. Then run “Generate” to create a Visual Studio Solution file or NMake Makefiles.

Building

The typical steps are to create a Visual Studio Solution file with CMake, load it into Visual Studio, and then build/develop as usual. Have fun!

However we also had a good experience with QtCreator and the build is much faster, too:

  1. Configure CMake as outlined above, but use the NMake Makefiles generator.
  2. In QtCreator, open CMakeLists.txt contained in the source root directory as a project. Then select the same build directory as in CMake.
  3. QtCreator will ask you to run CMake within the import dialog. It should just run through using its cache in the build directory.

If you have trouble building the software, please notify us. Thank you!