2022-08-29

boost library

Compile got error "LNK1104 cannot open file 'libboost_filesystem-vc141-mt-gd-x32-1_79.lib'”

Root Cause

Reference: https://www.boost.org/doc/libs/1_79_0/more/getting_started/windows.html

The only Boost libraries that must be built separately are:

 

Use the example tut1.cpp to test the setting

Reference: https://www.boost.org/doc/libs/1_79_0/libs/filesystem/doc/tutorial.html

 

How to use boost Library in Visual Studio

Follow instruction 5.2.1

https://www.boost.org/doc/libs/1_79_0/more/getting_started/windows.html

5.2.1   Install Boost.Build

Boost.Build is a text-based system for developing, testing, and installing software. First, you'll need to build and install it. To do this:

  1. Go to the directory tools\build\.
  2. Run bootstrap.bat
  3. Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed
  4. Add PREFIX\bin to your PATH environment variable.

Remark

Pre-request: Use “Administrator Command Prompt”

Step 1 - Process procedure 1 & 2

\boost_1_79_0\b2.exe should be build

Step 2

Execute \boost_1_79_0\b2.exe

Then \boost_1_79_0\stage\lib should be full of library and include this link in visual studio

 

Setting as below:





No comments:

Post a Comment