error LNK1104: cannot open file 'libcpmtd.lib'

Viewed 1307

I'm working on a project that build externals, when building the project a link error is raised : LNK1104 cannot open file "library.lib".

I have VS 2017 15.9.4, when i see the documentation /Qspectre documentation, they said that when i have the LNK1104 error is that i must install those libraries:

-MSVC version

-Visual C++ ATL with Spectre Mitigations

-Visual C++ MFC with Spectre Mitigations

I did that but it display the same error!

Someone faced the same problem please?

1 Answers

I post this solution for others who will faced the same problem, The problem is that the WDK for Windows 10, version 1709 (after cleaning my machine) with the VS 15.9.4 to upper.

if you install the "WDK for Windows 10, version 1803" the Spectre will be enabled by default. Whet you can do in this case is to create a "Directory.Build.props" and add this code inside (this file must be added in the project directory):

<Project>
  <PropertyGroup Label="Configuration">
    <SpectreMitigation>false</SpectreMitigation>
  </PropertyGroup>
</Project>

Hope it will help you,

Related