Search code examples
c++boostcompiler-errorsboost-filesystem

Error LNK1104 cannot open file 'libboost_filesystem-vc141-mt-gd-1_65_1.lib'


I cannot seem to solve this issue. I would like to use boost but continue to get the error LNK1104 cannot open file 'libboost_filesystem-vs141-mt-gd-1_65_1.lib'. I have followed the steps i.e: 1. Running the bat 2. Running the b2 (originally bjam) 3. Linked the files. After receiving the error I did digging and have changed a few other things. See images below for a better understanding of what I have completedThis is the VC++ where I added the boost_path.This is the linker

I appreciate all answers in the future, and thank you for taking the time.


Solution

  • Make sure you add the "<location of boost installation directory, where ever it was extracted>\stage\lib" to the linker library include path in the Visual Studio Debug Properties for the project. If you install boost via the Command Prompt by first running the bootstap.bat batch file followed by b2.exe , when the compiling process is complete, a message will be displayed instructing you to add that path, so the linker doesn't get confused when it looks for it.