Search code examples
c++boostmsvc-2017

LNK1104 cannot open file boost_thread-vc140-mt-gd-1_61.lib


I am using Microsoft Visual Studio Professional 2017, Version 15.9.25

Visual C++ 2017 - 00369-60000-00001-AA984
ASP.NET and Web Tools 2017 - 15.9.04012.0
ASP.NET Core Razor Language Services - 15.8.31590
ASP.NET Web Frameworks and Tools 2017 - 5.2.61435.0

When I compile the project I'm getting:

1>LINK : fatal error LNK1104: cannot open file 'boost_thread-vc140-mt-gd-1_61.lib'

I've searched all the files in the Project folder and I can see no reference to this file, I am using Boost 1.61 and all I can see in the boost folder is:

c:\boost\boost_1_61_0\stage\lib\boost_thread-vc120-mt-1_61.lib

How do I change the project settings to get it to use the correct file?


Solution

    1. Open the project properties, right click Project in Solution Explorer
    2. From the Configuration Properties click on the Platform Toolset and change the setting to Visual Studio 2013 (v120)
    3. Click on the OK button.
    4. Clean project and rebuild.