Skip to content

Windows compilation errors for VS2012 ( develop branch, CMake ) #646

@alex85k

Description

@alex85k

I tried to compile OSRM under Visual Studio 2012 using newer cmake system.

There are many errors - fixable and not:

  • Some includes are missing in CMakeLists.txt (compile errors when libraries are not in standard paths): [solvable]

      include_directories(${BZIP2_INCLUDE_DIR})
      include_directories(${ZLIB_INCLUDE_DIRS})
    
  • Boost finding issue: please could you expose BOOST_ROOT and maybe Boost_USE_STATIC_LIBS like in
    https://github.com/alex85k/osmium/blob/mingw/CMakeLists.txt#L36
    (then specifying boost location will not be painful)

  • min/max problems (due to defined macros) in all code like
    std::numeric_limits<uint64_t>::max()
    (similar to Windows compilation fixes #55 , solved with #undef min, #undef max )[solvable]

  • std::isnan - on MSVC compiler we could use only _isnan . Some #define are needed ?
    [solvable]

  • stxxl issues - I had to add

    add_definitions(-DSTXXL_BOOST_THREADS)
    add_definitions(-DSTXXL_BOOST_TIMESTAMP)
    add_definitions(-DSTXXL_BOOST_RANDOM)
    

    to disable windows-incompatible code. Maybe there is a better solution. [solvable]

The most serious issues:

  • Winsock error...
    Error 130 error C1189: #error : WinSock.h has already been included D:\LIBS\BOOST\include\boost-1_53\boost\asio\detail\socket_types.hpp 21
  • Can not find compatible luabind for Windows. 0.9.1 does not work... There are errors like this:
    Error 9 error C2780: 'luabind::class_ &luabind::class_::def(luabind::detail::operator_)' : expects 1 arguments - 2 provided D:\repos\Project-OSRM\Extractor\ScriptingEnvironment.cpp 91
  • asm volatile and asm( ... ) - not working on Microsoft compiler .Maybe do not use SSE2 - CRC for now?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions