4

I am currently trying to add boost to my c++ project but I am hit with this error

LNK1104 cannot open file 'libboost_serialization-vc140-mt-gd-1_62.lib'

i am actually trying this guys method Here

And i am going to use the headers only library using visual studio 2015 but i keep having this error , I've also tried using the nuget to install the boost but it gave me the same error

when i try using b.jam following this person's guide here

And I always get failed to update error so i have no clue what to do to get boost running in my C++ project

Community
  • 1
  • 1
Annonymous177
  • 563
  • 2
  • 10
  • 21

2 Answers2

12

First of all, need to Building Boost.Build engine (just run bootstrap.bat on Windows)

Second step is to compile boost libraries (run b2.exe on Windows)

Third and the final step is to add path "...\boost_1_62_0\stage\lib\" to General->Library directories project configuration

vSzemkel
  • 624
  • 5
  • 11
0

I got the same error when trying to build a CMake application using Boost on Windows, also after building Boost. I could find the exact *.lib file in the Boost directory, but I would still get the "Cannot open file" error.

I solved it by adding the -DBoost_USE_STATIC_LIBS="ON" flag to my application build. (You could also add set(Boost_USE_STATIC_LIBS ON) to your application CMakeLists.txt.)

Roberto
  • 958
  • 13
  • 33