I am making a C++ project (quite new to C++) and it needs the so called "boost" library. I thought I could add it with a nugget to make my life easier...(#include <boost\date_time.hpp>
added) but now I am getting this error
Error LNK1104 cannot open file 'libboost_date_time-vc141-mt-gd-1_65_1.lib'
What is the problem?
Error LNK1104 cannot open file 'libboost_date_time-vc141-mt-gd-1_65_1.lib'
According to the error, you should add the libboost_date_time-vc141-mt-gd-1_65_1.lib
library directory to your project configuration. This .lib
included in the NuGet package boost_date_time-vc140
or boost_date_time-vc141
.
Since you are using Visual Studio 2015, you just need install the NuGet package boost_date_time-vc140
to your project, NuGet will add the libboost_date_time-vc141-mt-gd-1_65_1.lib
library directory to your project configuration automatically. After installation completed, that error will be resolved.
Besides, since you are use boost
library in Visual Studio 2015, I suggest that you can use the boost-vc140
, which included many dependencies. So you do not need to add them manually.
Hope this helps.
You need to add the boost library directory to your project configuration, go to the project menu, then properties.
In the property tree go down to 'VC++ Directories' and in the library directories add \lib64-msvc-12.0 (change the 64 to 32 for 32 bit builds).
I suggest you do this through view->other windows->property manager, then it will be set up for all future projects as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With