Skip to content

Windows Compilation

Dennis Luxen edited this page Jun 11, 2014 · 22 revisions

To start compiling we need following software installed:

  1. Microsoft compiler and libraries:
  1. Git for Windows:
  1. CMake -http://www.cmake.org/cmake/resources/software.html (check "ADD TO SYSTEM PATH" when installing)
  2. I recommend Far Manager to simplify life under Windows Command Line.

All command-line compilation should be done from VS2013 64 bit command prompt (in Start menu)


Choose a folder for compiled dependencies (no standard paths for that in Windows), i.e. "d:\libs" and place the needed sources somehere else.

  1. Unpack somewhere zlib, bz2 and libxml sources (no stable repositories),
  1. Compile Boost.
  • Download and & unpack Boost 1.55: http://sourceforge.net/projects/boost/files/boost/1.55.0/
  • Use build_boost.bat or run the following from the command prompt:
  • Run bootstrap.bat from SDK command prompt.
  • bjam toolset=msvc-12.0 variant=release address-model=64 threading=multi link=static runtime-link=shared --prefix=d:\libs\boost -sBZIP2_SOURCE="d:\build\bzip2-1.0.6" -sZLIB_SOURCE="d:\build\zlib-1.2.8" install (for 64-bit static release boost, to compile all variants just omit variant=release link=static threading=multi, for VS2012 use msvc-11.0)
  • On VS2013 you may need to fix incompatibility https://svn.boost.org/trac/boost/ticket/9332 , replace file has_member_function_callable_with.hpp with the given one.
  1. Compile protobuf, osm-binary and Lua+LuaBind (did not try LuaJit)
  • Run build_other.bat (or follow thesame procedure as its contents - clone, cmake with flags, nmake install)
  1. Build stxxl
  • Run build_stxxl.bat
  • some errors may follow, in that case patch cmakelists.txt to exclude problematic .cpp (recursive template typedefs- error), see stxxl_win.patch (seem to work without it on VS2013 and latest stxxl)
  1. Compile OSRM :)
  • See build_osrm.bat (change the paths to actual ones).
  • Boost-finding errors are often, be sure to compile boost with the same bitness thatnt OSRM and with the same verion of compiler

= Notes =