Problems with PCL library configuration (win10+vs2013)

Source: Internet
Author: User

While watching the movie side with finally good, in the middle there are some problems, in the Internet is difficult to search, it is possible that everyone encountered different. Grope for a while finally all solved, record here, lest again encounter.

What is PCL is not introduced here.

Mainly refer to this blog to do, but I later encountered some problems, this blog did not come across, it may be the version of the reason it

http://blog.csdn.net/aptx704610875/article/details/49947049

Preparatory work:

Before compiling a PCL, you first need to compile several third-party libraries that are dependent on the PCL, mainly the following:

1. Boost 1.59.0

There are two ways to compile boost, one is to build a project with CMake vs compile, and the other is to use your own script, which is the second way I use it.

First download the Microsoft MPI, and then find the Mpi.jam in Boost\tools\build\src\tools, modifying the three lines:
249 line Local cluster_pack_path_native = "C:\\Program Files\\Microsoft MPI";
251 line If [GLOB $ (cluster_pack_path_native) \\inc:mpi.h]
260 Line options = <include>$ (Cluster_pack_path)/inc
Then open cmd, go to boost folder, run: Bootstrap.bat will generate Project-config.jam after running, open and add: Using MPI on line fourth;
The next step is to use CMD to enter the Boost folder, run: B2.exe toolset=msvc-12.0 address-model=32--build-dir=build\x86 install--prefix= "X:\X\Boost "-j8
Note If you are developing a x64 program instead of a 64-bit system, run: B2.exe toolset=msvc-12.0 address-model=64--build-dir=build\x64 install--prefix= "X:\X\ Boost "-j8
(where nothing msvc-12.0 stands for vs2013, if 11.0 is vs2012,14.0 is vs2015 behind the X:\X\Boost is the Boost folder, B2.exe is inside)
After completion, establish the BOOST_ROOT variable in the environment variable, and the value is the Boost folder address X:\X\Boost

2, Eigen 3.2.7

Eigen is a few templates, actually do not need to compile, I follow the above blog in the manner of compiling a lot of errors.

3, FLANN 1.8.4

Use Cmake,sourse to select Flann folder (such as C:\flann), build directory to select build (such as C:\eigen\flann) under Flann. Clicking Configure will prompt you to create a new build folder, select the vs12 2013 compiler, and note that it is important to find the Cmake_install_prefix option, which defaults to C:\Program Files (x86) \flann, Please modify the folder for your Flann, such as the above C:\flann, otherwise the install will be wrong after. Then add a entry:
Name:cmake_debug_postfix
Type:string
Value:-GD
After modifying, point configure again, then generate.

Then open the generated project with VS2013 compile, and add the environment variable after completion flann_root

4, Qhull 2012.1

Use Cmake,sourse to select Qhull folder (such as C:\qhull), build directory to select build (such as C:\qhull\build) under Qhull. Click Configure (will not be prompted to create the build folder because the build already exists), select the vs12 2013 compiler, and note that it is important to find the Cmake_install_prefix option, which is the default C:\Program Files (x86 \qhull, please modify the folder for your qhull, such as the above C:\qhull, otherwise the install will be wrong after. Then add a entry:
Name:cmake_debug_postfix
Type:string
Value:-D
After modifying, point configure again, then generate. Open the Qhull.sln project file in the Qhull\build folder, and after the file is loaded, modify the project properties of Libqhull and USER_EG2, compile as C + + code (/TP), C + +, advanced, and generate All_ when finished Build (Debug and release), and then generate the install. You can see the Include and Lib folders appear in the Qhull folder when you are finished. Finally, the Qhull_root variable is established in the environment variable, and the value is Qhull folder address.

5, VTK 6.3.0

VTK 6.3.0
Use Cmake,sourse to select VTK folder (such as C:\VTK), build directory to select build (such as C:\VTK\build) under VTK. Clicking Configure will prompt you to create a new build folder, select the vs12 2013 compiler, and note that it is important to find the Cmake_install_prefix option, which defaults to C:\Program Files (x86) \VTK, Please modify the folder for your VTK, such as the above C:\VTK, otherwise the install will be wrong after. Then add a entry:
Name:cmake_debug_postfix
Type:string
Value:-GD
After modifying, point configure again, then generate. Open the VTK.sln project file in the Vtk\build folder, after the file is loaded, (Debug and release) Generate All_build (time is a bit long, wait patiently), build install after completion. You can see the Include and Lib folders appear in the VTK folder when you are finished.

6. QT (optional)

If you want to develop a visual interface, it is recommended to install a QT, according to the default settings can be.

7, Gtest

Theoretically this should be optional, but in my compilation when the choice of build_visualization, will be error, display can not find gtest, so the proposal also compiled this, the steps and the above with cmake consistent.

To compile the PCL:

With CMake, select the source code path and the target path, click Configure, select the compiler, the following error will appear:

The Include directory for Eigen is not found, click Grouped,

Modify Eigen_include_dir to Eigen's INCLUDE directory, as mine is D:\PCL\eigen-327\eigen327\include\eigen3, modify

Cmake_install_prefix is the PCL catalog, click Configure again,

Then you will find that the VTK directory is not found, manually change vtk_dir for your own VTK directory, D:\PCL\VTK630\VTK-6.3.0\lib\cmake\vtk-6.3,

Tick build_visualization, configure again, this time can be configured successfully, and then click Generate Build Project

There will be some problems at compile time, then more, first write to this

Problems with PCL library configuration (win10+vs2013)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.