Search code examples
c++visual-studiovisual-studio-2015visual-studio-2022

Upgrade from Visual Studio 2015 to Visual Studio 2022: Error LNK1104 cannot open file 'msvcprtd.lib'


I am trying to upgrade a project from Visual Studio 2015 to VS2022 and getting the following error:

Error LNK1104 cannot open file 'msvcprtd.lib'

When I compile it as a VS 2015 project, it works, but once I switch it to VS 2022, it fails.


Solution

  • In my case, I needed to select the checkmark 'Inherit from parent or project defaults' in library directories

    I created a new empty project and compared the library settings with my older project to see what was the difference.