getboost
getboost copied to clipboard
How to use boost.targets in VS2019?
I specified the following in packages.config and restored the package. And that downloaded all the boost headers and boost.1.72.0.0\build\boost.targets
<package id="Boost" version="1.72.0.0" />
<package id="Boost-vc142" version="1.72.0.0" />
I also added the following to the vcxproj:
<Import Project="..\packages\boost-vc142.1.72.0.0\build\boost-vc142.targets" Condition="Exists('..\packages\boost-vc142.1.72.0.0\build\boost-vc142.targets')" />
The header files are getting referenced properly but in linking phase I still get:
Error LNK1104 cannot open file 'libboost_program_options-vc142-mt-x64-1_72.lib'
What step am I missing?
After adding $(SolutionDir)packages\boost.1.72.0.0\build;
to the vcxproj <AdditionalDependencies>
under <Link>
, I'm getting the following error:
1>LINK : fatal error LNK1181: cannot open input file 'packages\boost.1.72.0.0\build.obj'
Some boost packages are not header only. Maybe adding just https://www.nuget.org/packages/boost_program_options-vc142/ directly enables the finding of the lib for linking.