Tutorials Home | Previous | Next |
---|
This tutorial will guide you through the different steps to install libpointmatcher and its dependencies.
This tutorial is divided up like this:
- Introduction
- Ressources (Libraries version & Download links)
- Notes
- Installation
Name | Download Link | Version (Tested February 11, 2021) |
---|---|---|
Windows | 10 v1909 64bit | |
Visual Studio | https://visualstudio.microsoft.com/ | 2019 16.8.5 |
MSVC++ Compiler | (with Visual Studio) | 14.2 |
Git | https://git-scm.com/downloads/ | 2.30.1 |
CMake | https://cmake.org/ | 3.19.0 |
Boost | https://www.boost.org/users/download/ | 1.75.0 |
Eigen3 | http://eigen.tuxfamily.org/index.php | 3.3.9 |
grep | http://gnuwin32.sourceforge.net/packages/grep.htm | 2.5.4 |
libnabo | https://github.com/ethz-asl/libnabo | Commit 16250bf |
libpointmatcher | https://github.com/ethz-asl/libpointmatcher | Commit e9a832d |
- It's recommended to use Windows PowerShell with administrator privileges as your CLI
- All necessary environment variables will be configured so that CMake automatically finds all libraries and you don't have to specify the libraries' paths to CMake each time you use it
- When adding any environnement variable, add for All users (system variables)
- Environement variables are case unsensitive (PATH = Path)
- Add new environement variables in PATH on top of the list (to avoid conflicts)
- You must restart your CLI and CMake for new environment variables to take effect
- In this tutorial,
C:\dev
will be used as root directory for all installations. The folder can be wherever you want, but it is strongly recommended that the path has no spaces.
- C++ compiler (get MSVC compiler by insatalling Visual Studio)
- Git
- CMake
-
Download
boost_<version>.zip
-
Extract
boost_<version>
inC:\dev
-
Go to your Boost source directory with your CLI, and do:
.\bootstrap.bat .\b2.exe
-
Set the following three environment variables:
BOOST_LIBRARYDIR = C:\dev\boost_<version>\stage\lib
BOOST_INCLUDEDIR = C:\dev\boost_<version>
BOOST_DIR = C:\dev\boost_<version>\stage\lib\cmake\Boost-<version>
-
Add
C:\dev\boost_<version>\stage\lib
toPath
environement variable
Eigen is header only (see Eigen's "Getting stated" page) and don't need to be build.
- Download
eigen-<version>.zip
- Extract
eigen-<version>
inC:\dev
- Set
EIGEN3_INC_DIR
environment variable toC:\dev\eigen-<version>
(folder withsignature_of_eigen3_matrix_library
file)
- Download the last Setup "Complete package" of Grep for Windows
- Execute the Setup and extract the
GnuWin32
folder inC:\dev
- Add the path to the Grep .exe (
C:\dev\GnuWin32\bin
) files to thePath
environment variable.
You need to install Eigen3 and Grep before installing libnabo !
-
Go to your desired directory with your CLI (here
C:\dir
) -
Do the folowing commands
git clone https://github.com/ethz-asl/libnabo mkdir .\libnabo\build cd .\libnabo\build\ cmake-gui ..
CMake-Gui will open up
-
Click on the button Configure and specify the generator for the project (Visual Studio 16 2019)
An 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.
-
Set the CMake variable
EIGEN_INCLUDE_DIR
toC:\dev\eigen-<version>
-
Click on the button Configure, Generate and then Open Project Visual Studio will open up
Maybe you will have messages about Doxygen, OpenCL, ANN, FLANN and Python missing. They are not necessary to install libnano.
-
Put your "Solution Configuration" in
Release
mode -
Build the
ALL_BUILD
project -
Rebuild for each configuration mode you will use, i.e. Release/Debug/RelWithDebInfo/MinSizeRel
(Libnabo build a different .lib for each configuration mode)
You need to install libnabo before installing libpointmatcher !
-
Go to your desired directory with your CLI (here
C:\dir
) -
Do the folowing commands
git clone https://github.com/ethz-asl/libpointmatcher mkdir .\libpointmatcher\build mkdir .\libpointmatcher\build\install cd .\libpointmatcher\build\ cmake-gui ..
CMake-Gui will open up
-
Click on the button Configure and specify the generator for the project (Visual Studio 16 2019)
-
Set the CMake variable
EIGEN_INCLUDE_DIR
toC:\dev\eigen-<version>
-
Set the CMake variable
CMAKE_INSTALL_PREFIX
toC:/dev/libpointmatcher/build/install
CAUTION ! Use forward slash
/
-
Click on the button Configure, Generate and then Open Project
Visual Studio will open up -
Put your "Solution Configuration" in
Release
mode -
Build the
INSTALL
projectWe have to install the library and not only build it, because otherwise all CMake files won't be able to be found by programs using libpointmatcher
-
Set
libpointmatcher_DIR
environement variable toC:\dev\libpointmatcher\build\install\share\libpointmatcher\cmake
Currently, we don't have a developer fully supporting compilation on Windows. If you can help refreshing this documentation, your help is more than welcome.
Before reporting new building issues, have a look in the current/past list of issues. Add as much details as you can since you will most probably receive answers from developers that cannot reproduce the problem on their side. Here are some of them:
- Your directory structure need to be well organized as mention in Issue #136.
- There might be some problems related to libnabo as mention in Issue #118.
Special thanks to the following users in helping us with the Windows support:
- kwill for keeping the documentation up-to-date and investing time to make libpointmatcher compiling on Windows.
- braddodson for porting a version of libpointmacher in
C#
with a limited set of features. The code can be found here: https://github.com/braddodson/pointmatcher.net