Reputation: 107
I've recently been introduced to vcpkg as I've been looking for the best way to install Point Cloud Library (PCL) in order to use it in my Visual Studio C++ project.
I've installed PLC static libraries using .\vcpkg install pcl:x64-windows-static
and then .\vcpkg integrate install
to integrate the libs and dlls to Visual Studio 2017. My goal for now is to run the demo of Iterative Closest Point Algorithm on the official PCL website.
I have created a virgin project and I've done the following to add PCL:
I'm trying to compile the previously mentioned demo in Debug x86 mode but I keep getting the following error:
1>LINK : fatal error LNK1104: cannot open file 'manual-link.obj'
Please note that in the installed PCL directories, there are two folders called manual-link.
The first one is "vcpkg-master\installed\x64-windows-static\debug\lib\manual-link" and contains two lib files:
The other one is "vcpkg-master\installed\x64-windows-static\lib\manual-link" and includes:
I don't know what I'm missing here. Has anybody experienced the same problem with PCL and Visual Studio 2017? Any solutions to this problem?
Upvotes: 0
Views: 2445
Reputation: 556
The x64-windows-static
triplets won't be automatically selected[1] -- you need to edit your MSBuild vcxproj and set the VcpkgTriplet
MSBuild property to x64-windows-static
:
<PropertyGroup Label="Globals">
<!-- .... -->
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
</PropertyGroup>
Note that you will also need to change to static link the CRT (/MT) if you do this.
Alternatively, you can install the dynamic libraries (x64-windows
) and they will be automatically picked up by default and work with the settings for your new project without any changes.
Either way, you should not need to add any paths to your Additional Include Directories or to your Additional Dependencies.
[1] https://github.com/Microsoft/vcpkg/blob/master/docs/users/integration.md#triplet-selection
Upvotes: 0