Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vc++ vs2013 code with boost powered by nuget does not build

I am quite new to VC++ and Boost. My problem is that I want to use Boost 1.56.0 in my VC++ Visual Studio 2013 project (so I use vc120).

I have installed Boost via NuGet (https://www.nuget.org/packages/boost/). Everything seems to be okay, but when I try to build my project it says:

Fatal error LNK1104: Cannot open file "libboost_thread-vc120-mt-gd-1_56.lib".

Do you know where exactly the problem is and how I can fix it?

I thought installing a package using NuGet will do the whole job to get things working on its own. I know that the linker can't find the lib file (actually there was no build process at all). But I don't know how I can fix this issue.

I think it is not a good idea to manually compile Boost with VC120 and add the lib folder to the additional paths of the linker. Why should I use NuGet then?

Any help is welcome - I am trying and searching the internet for so many hours now and I couldn't fix the problem.

Thank you, Stefan

like image 245
Skully Avatar asked Oct 22 '14 19:10

Skully


1 Answers

As mentioned before, Boost Nuget can't contain all possible compiled libraries for all possible configuration and compiler versions. However, there are separete precompiled Nuget packages and also source packages. Here is a list of all 1.56.0 Boost Nuget packages https://getboost.codeplex.com/releases/view/126256

In your case, I would suggest to use precompiled boost_thread-vc120.1.56.0. Not 1.57 yet!

If you are lazy, you can also use boost-vc120.1.56.0 which depends on all precompiled Boost libraries for Visual Studio 2013.

like image 65
Sergey Shandar Avatar answered Sep 22 '22 03:09

Sergey Shandar