Search code examples
c++visual-studioboost

Compiler: cannot open file 'libboost_serialization-vc143-mt-gd-x64-1_81.lib'


I'm getting error LNK1104 from build for file libboost_serialization-vc143-mt-gd-x64-1_81.lib when trying to build my .cpp file. Here are my include directories:

#include <iostream>
#include <string>
#include <functional>
#include <vector>
#include "boost\asio.hpp"
#include "boost\serialization\serialization.hpp"
#include "boost/archive/binary_iarchive.hpp"
#include "boost/archive/binary_oarchive.hpp"
#include <utility>

My visual studio toolset is: 1

Which absolutely matches with the libboost library. I am building in Debug mode on x64. My additional include directories for both VC++ and under C/C++ > General are:

enter image description here

And C:\local\boost_1_81_0\stage\lib absolutely has a file by the name of libboost_serialization-vc143-mt-gd-x64-1_81.lib in it:

enter image description here

I compiled the boost library by running bootstrap.bat and then b2.exe. I cannot fathom why this file can't be opened... It exists, and boost is compiled. Any help?


Solution

  • You must also provide the stage\lib path for the Linker under Linker > All Options > Additional Library Directories.