LINK: fatal error LNK 1104: cannot open file 'LIBCMT.lib'

后端 未结 7 1544
情深已故
情深已故 2021-01-08 00:31

Please help, I have spent all day trying to make my c++ app compile.

My project contains one source file: Foo.cpp. Here is its code:

#include 

        
7条回答
  •  天涯浪人
    2021-01-08 01:12

    Resurrecting this thread in late 2018 since none of the other solutions helped my case :)

    For me this error started appearing out of nowhere after i installed Windows Driver Kit for a completely unrelated project.

    If you don't need "Spectre Mitigation" (you most likely do not) and seeing this error it's highly probable that you just have to set Project Properties (property pages) -> Configuration Properties -> C/C++ -> Code Generation -> Spectre Mitigation to Disabled.

    Magically it was set to Enabled by the installer of Visual Studio tools for WDK in all projects even tho they got nothing to do with WDK nor the Platform toolset was selected for any driver related stuff. Microsoft at its finest.

提交回复
热议问题