Installing PCL All-in-one
- Just follow the instructions on the site to download and install a version of PCL e.g. PCL 1.7.2 All-in-one Installer MSVC2015 X64, for your development environment.
- Also download a suitable Visual Studio property sheet e.g. PCL Property Sheet, and save the file on your machine as e.g. pclPropertySheet.props.
- After installing, add the bin folder locations of PCL and VTK to the Windows PATH environment variable, as shown below.
Setting up Visual Studio
- Run Visual Studio. Select File | New | Project.
The New Project dialog appears. - Select Templates | Visual C++ | General. Choose Empty Project. Type in a project Name e.g. HelloPCL. Browse to a Location. Click OK.
The project is created. - In the top right pane, click the Property Manager tab.
The Property Manager tab is activated. - Click the Add Existing Property Sheet icon, as shown above.
The Add Existing Property Sheet dialog box appears. - Browse and select the previously downloaded property sheet e.g. pclPropertySheet.props. Click Open.
The property sheet is loaded. - Now create a new C++ source file, e.g. main.cpp.
- In the C++ file, type in PCL include header file(s) and classes, as shown below.
- Optional: the PCL headers and classes may display wavy red under lines. If so make sure you are working in the correct configuration. In this example, the environment is for x64. Change the configuration to x64 from x86.
Visual Studio now recognizes the PCL headers and classes.
I'm using pcl 1.10.1 - the newest version up-to-date.
ReplyDeleteI tried downloading a property sheet from https://gist.github.com/UnaNancyOwen/d2c380603a4642525b5c
and edit the file to the versions of the libraries I downloaded.
It still doesn't work.
Is there any official property sheet?
I don't use this method anymore and it is easier to use cmake to generate the make files. You can try using it to generate the VS solution files.
ReplyDelete