Installing/Windows Build

From Sumo
Revision as of 09:49, 9 September 2017 by Palcraft (talk | contribs)
Jump to navigation Jump to search

This document describes how to build SUMO under MS-Windows using only freely available (this does not mean "open source") tools. Instructions on how to build SUMO on Windows using an Open Source toolchain are included in our building on Linux pages. Please note that You may also download pre-build Windows binaries.

Please read the whole document before you start, there are some detours and shortcuts included.

If you do not need the GUI, you can skip everything concerning Fox. If you do not need precise geodata conversion, you can skip everything concerning GDAL, Proj.

  • Download Visual C++ Express Edition. SUMO is only compatible with Visual Studio 2013 or higher. If you are using Windows 8 or later be sure to download Visual Studio Express for Windows Desktop. Please install all the available Service Packs for Visual Studio as well. Note that with Visual Studio Express 2017 SUMO only can be compiled in Release Mode.
  • Download Python for Windows and install it. Our most preferred version is Python 2.7.x for the 32 bit platform, but you may try Python 3 and / or 64bit as well.
  • Download and extract or a different version (or use a repository checkout, see Downloads)
  • Note on installation paths: MSVC seems to have difficulties with include and library paths containing spaces (for instance C:\Program Files). Thus try to avoid installing SUMO or any of the libraries in such paths.
Please note that for compiling from svn Python has to be installed on your system.


There are two ways of telling the SUMO build where to find its libraries. Either via environment variables or by editing a config file. This document only describes the latter (easier) way, for details on the former and also on how to use different versions and additional libraries see Installing/Windows_Libraries.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="">
  <PropertyGroup Label="UserMacros">
  • Add all directories containing dlls (XERCES\bin, PROJ_GDAL\bin, FOX16\lib) to your PATH or copy the dlls into a directory which is in your PATH.
    • If you build for 64 bit and for 32 bit be sure that you add both dirs and that you add the 64 bit dir before the 32 bit dir.



  • If you installed all libraries and edited the config.props (or defined the environment variables) correctly there is no need for further configuration and you can skip to the build section.
  • The Visual Studio build is configured using .props files in the build/msvc10 subdirectory. If you change some settings which should apply to all subprojects, be sure to edit those files (either with a text editor or the property manager of Visual Studio) and not the project configuration (.vcxproj).
  • Even if you generated the config.props as above, you can still define the places of the includes and libraries via environment variables (just refer to them as in the example above). If you want to disable certain features, set the config entry to the empty string. Everything but Xerces is optional, but without Fox it is not possible to build the GUI related projects.


  • Open the project <SUMO>\build\msvc10\prj.sln and build the configurations you need.
  • For some additional emission tools you need to open <SUMO>\build\msvc10\tools.sln and build them as well
  • You will find the results in <SUMO>\bin


  • If you plan to extend SUMO yourself, or just want to know whether everything compiled OK, it is strongly recommended to have a look at Developer/Tests. This tool makes it easier to check whether some existing functionality was broken by the extensions.


Linker reports something similar to "LINK : fatal error LNK1104: cannot open file 'C:\Program.obj'"

You probably have installed a library to a path containing white spaces in its name. In such a case, the according environment variable should be embedded in quotes (").
Example: set FOX="D:\my libs\fox-1.6.36".

Failure on pre-build event (missing version.h or *typemap.h)

If Visual Studio reports a failed pre-build event you can safely ignore this, unless you are building from the subversion repository. In this case you should probably install Python. Even if python is installed the file associations may be broken which causes the generation of src/version.h via tools/build/ to fail. Either repair your file associations or undefine HAVE_VERSION_H in src/windows_config.h.

If you did install Python correctly, double check that it passes command line arguments. For a quick fix, you can also execute the following three commands manually:

tools\build\ poly

Available configurations

The release build is used for the distribution of sumo. The Fastbuild is suitable for frequent recompilation and the Debug build allows all debugging features. Keep in mind that Texttest usually picks up the release build.

  • Release: All optimizations, assertions disabled, no debugging symbols, links against external release libs
  • Fastbuild: Fewer optimizations, assertions disabled, debugging symbols included, links against external release libs
  • Debug: No optimizations, assertions enabled, debugging symbols included, links against external debug libs

Naming Conventions: 64bit executables have the same name as their 32bit counterpart. The Debug build additionally carries the suffix 'D' whereas the Fastbuild uses the 'F' suffix.