[英]LNK1104: cannot open file 'C:\Program Files (x86)\Windows Kits\10\\lib.obj'
I am generating a GoogleTest project for a C++ library in Visual Studio 2019 (Community Version) and created it via the wizard.我正在为 Visual Studio 2019(社区版)中的 C++ 库生成一个 GoogleTest 项目并通过向导创建它。
I have set Project/Properties/Linker/Additional Dependencies = $(WindowsSdkDir)\\lib;我已经设置了 Project/Properties/Linker/Additional Dependencies = $(WindowsSdkDir)\\lib; to resolve an initial linker error
(LNK1104: cannot open file 'libcpmtd.lib')
.解决初始链接器错误
(LNK1104: cannot open file 'libcpmtd.lib')
。 I now get:我现在得到:
1>LINK : fatal error LNK1104: cannot open file 'C:\Program Files (x86)\Windows Kits\10\\\\lib.obj'
How do I resolve this?我该如何解决? (I notice a double slash in this path: something needs to be installed? Possibly an environment variable?)
(我注意到此路径中有一个双斜杠:需要安装某些东西?可能是环境变量?)
I tried adding /VERBOSE to the command line but got no additional information.我尝试将 /VERBOSE 添加到命令行,但没有得到其他信息。
Add The Library to the Path in the Properties Page -> Linker -> General, If You have Added then Try Including it in the Properties Page -> Linker -> Input.将库添加到属性页面中的路径 -> 链接器 -> 常规,如果已添加,则尝试将其包含在属性页面 -> 链接器 -> 输入中。 If You dont like using Slashes, Visual Studio has Macros for That, Or else Just Copy and Past the Path.
如果您不喜欢使用斜杠,Visual Studio 有用于此的宏,否则只需复制并粘贴路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.