Visual studio c++ Link1104 cannot open file MSVCURTD.lib

I have opened a project made with visual studio 2012 express (written in c++) with visual studio 2017 community, when I try to compile I get the following mistake:

LINK1104 cannot open file MSVCURTD.lib

(I don't have this mistake if I compile with vs 2012) I am not a c++ expert so I don't know how to solve this problem

Thanks for your help...

Upvotes: 8

Views: 12084

Answers (4)

Tim Makins
Tim Makins

Reputation: 492

In the Solution Explorer, Right-click Project > Properites > Configuration Properties > C/C++ > General > Common Language RunTime Support > choose 'Common Language RunTime Support (/clr)' > OK

Upvotes: 9

Christian
Christian

Reputation: 11

In my case the error message was caused by a /clr:pure switch of the Project. My environment: VS2019-enterprise, Win10, today 13.1.2021 On "learn.microsoft.com" I read the article ".NET programming with C++/CLI" and complemented my VS2019 installation with the latest "C++/CLI support for v142 build tools" component. And it worked.

sinc Ch

Upvotes: 1

Tonecops
Tonecops

Reputation: 167

I restarted installer and chose Universal Windows Platform runtime. That is correct solution because there is a real possibility that one does not have the old VC SDK version installed. If old not installed the choosing older SDK would not work. Pic showsthe area in installer where setting can be found

Upvotes: 2

Phil Jollans
Phil Jollans

Reputation: 3769

I had the same problem and I was able to fix it as suggested by MGetz. This answer just adds more detail.

Open the project's property pages, via the Project menu (Project/Properties) or from the context menu on the project in the solution explorer.

enter image description here

Find Platform Toolset in the General section.

enter image description here

Open the drop down list and select <inherit from parent or project defaults> if that option is present.

enter image description here

This worked for me. In my case that resulted in selection of the toolset Visual Studio 2010 (v100), but I think that will be dependent on what toolsets you have installed.

After selecting the toolset, Visual Studio indicates it next to the project name in the solution explorer.

enter image description here

If the option <inherit from parent or project defaults> is not available, then try one of the others. Since you said that your project was created with Visual Studio 2012, you should probably try selecting that version.

Upvotes: 2

Related Questions