Tutorials Home | Next |
---|
######Latest update March 29, 2014 by François Pomerleau
The following instructions are aimed at users of Windows. The steps from this tutorial were performed on Windows 7. These instructions should be identical previous versions of Windows.
If you are used to development project, here what you need:
Name | Link | Version tested |
---|---|---|
git | http://windows.github.com/ | v1.0 |
libpointmatcher sources | /~https://github.com/ethz-asl/libpointmatcher | |
libnabo sources | /~https://github.com/ethz-asl/libnabo | |
Visual Studio | http://www.microsoft.com/visualstudio/eng/downloads | Visual Studio 2012 Express for Windows Desktop |
CMake | http://www.cmake.org/cmake/resources/software.html | cmake-2.8.11.2-win32-x86.exe |
Eigen 3 | http://eigen.tuxfamily.org/index.php?title=Main_Page#Download | v3.2.0 |
Boost | http://www.boost.org/users/download/ | v1.54.0 |
yaml-cpp | https://code.google.com/p/yaml-cpp/downloads/list | v0.3.0, not working with v0.5.0 |
grep tool | http://gnuwin32.sourceforge.net/packages/grep.htm | v2.5.4 |
gtest | https://code.google.com/p/googletest/ | v1.7.0 |
-
Open a console that knows the path to the MSVC compiler command (cl). We suggest to use Windows PowerShell. An alternative is from the Start menu in the Visual Studio section; for instance for VS 2012, it is called Developer Command Prompt for VS2012.
-
Go to your Boost source directory, and do:
$ bootstrap $ b2 install --prefix=build address-model=64
-
It may take awhile to finish.
-
Start CMake Gui
-
Add the path of your libnabo sources in the field Where is the source code.
-
Add a folder named build in the field Where to build the binary. This will allow you to do out-of-source compilation.
-
Click on the button Configure
- Select the generator for the project (Visual Studio 11 Win 64)
- Error will be reported, because CMake does not know yet where to find the libraries. The next steps will tell it where to find them.
-
Locate your eigen folder in the field EIGEN_INCLUDE_DIR
-
Add the following boolean variable and set it to
true
: Boost_USE_STATIC_LIBS -
Add the following PATH variable and set it to (your boost folder)/build: BOOST_ROOT
-
Change the variable CMAKE_CONFIGURATION_TYPES to
RelWithDebInfo
-
Click on the button Configure again, then on Generate
-
Locate the Microsoft Visual Studio Solution file in the your build folder (libnabo.sln) and open it. Visual Studio should open.
-
Build the solution: BUILD -> Build Solution
Command line alternative for building: in (your libnabo folder)/build:
$ msbuild /m:2 libnabo.sln
Note that the flag /m:X defines the number of core to use.
-
Start CMake Gui, follow the same building step
-
Change the variable CMAKE_CONFIGURATION_TYPES to
RelWithDebInfo
-
Click on the button Configure, then on Generate
-
In visual Studio, build the solution: BUILD -> Build Solution
Command line alternative: in (your yaml-cpp folder)/build:
$ msbuild /m:2 YAML_CPP.sln
Note that the flag /m:X defines the number of core to use.
-
Open the file CMakeList.txt and add at the end:
if( MSVC ) # VS2012 does not support tuples correctly yet add_definitions( /D _VARIADIC_MAX=10 ) endif()
-
Start CMake-Gui to generate a MSVC solution
-
Change the variable CMAKE_CONFIGURATION_TYPES to
RelWithDebInfo
-
Change the variable gtest_force_shared_crt to
TRUE
-
Click on the button Configure, then on Generate
-
In visual Studio, build the solution: BUILD -> Build Solution
Command line alternative: in (your gtest folder)/build:
$ msbuild /m:2 gtest.sln
Note that the flag /m:X defines the number of core to use.
-
Start CMake Gui
-
Follow the same building steps
-
Add the following boolean variable and set it to true: Boost_USE_STATIC_LIBS
-
Add the following PATH variable and set it to [boost folder]/build: BOOST_ROOT
-
Change the variable CMAKE_CONFIGURATION_TYPES to
RelWithDebInfo
-
You will need to fill manually the following variables:
- EIGEN_INCLUDE_DIR to (your eigen folder)
- NABO_INCLUDE_DIR to (your nabo folder)
- NABO_LIBRARY to (your nabo folder)/build/RelWithDebInfo/nabo.lib
- yaml-cpp_INCLUDE_DIRS
- yaml-cpp_LIBRARIES
- GTEST_INCLUDE_DIR
- GTEST_LIBRARY
- GTEST_MAIN_LIBRARY
-
In visual Studio, build the solution: BUILD -> Build Solution
Command line alternative: in (your libpointmatcher folder)/build:
$ msbuild /m:2 libpointmatcher.sln
Note that the flag /m:X defines the number of core to use.