2

I am getting this error .I managed to find similar question on stackoverflow Fatal error LNK1104: cannot open file 'libboost_log-vc141-mt-gd-1_64.lib'.

I tried to follow the same steps in visual studio 2019.But I could not figure out how to remove this error . I have done right click on project name-> properties->linker->general->Additional Library Directories->packages\boost.1.72.0.0\lib\native\include .

Packages are installed in NuGet using the “Install-Package” command.

PM> Install-Package boost
PM> Install-Package boost_date_time-vc141
PM> Install-Package boost_filesystem-vc141
PM> Install-Package boost_log-vc141
PM> Install-Package boost_system-vc141
PM> Install-Package boost_thread-vc141
PM> Install-Package boost_chrono-vc141
PM> Install-Package boost_log_setup-vc141
PM> Install-Package boost_chrono-vc141
PM> Install-Package boost_atomic-vc141

Please someone who can solve this is issue please answer my question.

Nurav
  • 167
  • 1
  • 3
  • 15

1 Answers1

0

I have done the same mistake following the instructions on the following page:

GETTING STARTED QUICKLY WITH C++ LOGGING

As your LINK Error 1104 is indicating, I guess you are using Visual Studio 2019 with platform toolset v142, as seen in the image:

enter image description here

In this case, you have to install the boost libraries for platform v142 instead of v141:

PM> Install-Package boost
PM> Install-Package boost_date_time-vc142
PM> Install-Package boost_filesystem-vc142
PM> Install-Package boost_log-vc142
PM> Install-Package boost_system-vc142
PM> Install-Package boost_thread-vc142
PM> Install-Package boost_chrono-vc142
PM> Install-Package boost_log_setup-vc142
PM> Install-Package boost_chrono-vc142
PM> Install-Package boost_atomic-vc142
Rene
  • 976
  • 1
  • 13
  • 25