-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Windows Compilation
Daniel J. H edited this page Jan 13, 2016
·
22 revisions
To start compiling we need following software installed:
- Microsoft compiler and libraries:
- For latest version compilation you need Visual Studio 2013 or VS 2013 Express for Desktop
- http://www.microsoft.com/en-US/download/details.aspx?id=40787
- Run its Native x64 Command Prompt or x64 cross tools for Express. Older unsopported variants:
- Windows SDK 7.1 : http://www.microsoft.com/en-us/download/details.aspx?id=8279
- Git for Windows:
- http://msysgit.github.io/ (also includes msys linux-like command prompt) (check "use Git from the Windows command prompt" when installing)
- CMake
- http://www.cmake.org/cmake/resources/software.html (check "Add CMAKE to system path" when installing)
- Far Manager may simplify things with the Windows command prompt
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.
- Unpack somewhere zlib, bz2 and libxml sources (no stable repositories),
- Bat-file tested for the following sources:
- Run build_base.bat or compile each library manually.
- 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.
- 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)
- 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)
- 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 =
- You can compile some of the cmake-based projects under Visual Studio, replacing generator
-G "NMake Makefiles"
with-G "Visual Studio 12 Win64"
(VS2013) or-G "Visual Studio 11 Win64"
(VS2012). - It is also convenient to use QtCreator IDE (it supports cmake), I was even able to debug running OSRM.
- Necessary DLLs from
libs\bin
should be available in system PATH or current folder to run OSRM. - For testing you need to install Ruby:\
http://rubyinstaller.org/news/2013/11/24/rubyinstaller-1-9-3-p484-and-2-0-0-p353-released/
(then
gem install bundle
,bundle install
)
- Batch files and source code patches are available here.
- Support files are available here