LNK1104 cannot open the file uuid.lib in VS2017/2019

Posted ice-arrow

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LNK1104 cannot open the file uuid.lib in VS2017/2019相关的知识,希望对你有一定的参考价值。

 

以下是2017的方法,本人碰到的是2019的同样问题

After installing Visual Studiio 2017 I noticed that I did not have any templates for the Common Language Runtime (CLR). I went through the prodcedures to modify the installation to include the CLR templates using the setup wizard. After creating a simple Hello, World! program with the CLR Console Application template and preforming a build I imideatly see the Error Diplayed. LNK1104 cannot open the file uuid.lib I have installation of 2015 Community and 2013 Professional in which the IDE‘s do not display this error message under the same conditions, and have been working since the install prior to 2017 and the program is the same which appears in 2017 including the header files. A screen shot of the error is provided.

 

Was able to preform the following solution to the issue. This is similar to an issue which was stated by Daniel Griffing with the Windows 10 SDK changes. You may receive the following error messages...

When Compiling C++/CLI Projects / LNK1104: cannot open file uuid.lib
When Compiling Standard C++ Projects / LNK1104: cannot open file kernel32.lib

There may be other error messages but these are the one‘s that I am aware of. But usually the key factor is that a file is missing generating a Linker error message.

This issue specifically stems from Windows Software Development Kit version 10.0.15063.137 components not being installed. You can possibly preform the following steps to resolve the issue without reinstalling Visual Studio 2017:

Right Click on the Windows 10 Start Menu and left click on Control Panel


If in Category View click on Programs or Uninstall a Program, if Icon view click on Programs and Features


Scroll to the listing Windows Software Development Kit - Windows 10.0.15063.137 and right click on it to bring up the change menu ... WARNING do not uninstall this component.

Left click on the option change in the context menu. On the Maintain Your Windows Software Development Kit window the radio button should default to the Change option if it is then click on Next button to continue.

On the Features window options go through the list and see if the following features have check mark missing on them, if they are then this may be what is causing the issue....

- Windows SDK for Desktop C++ x86 Apps
- Windows SDK for Desktop C++ amd64 Apps
- Windows SDK for Desktop C++ arm Apps
- Windows SDK for Desktop C++ arm64 Apps

If checkmarks are missing select the Architecture targeted in your Visual Studio build(s) and then click on the Change button. Windows will then attempt to install the selected components provided that the computer meets the requirements and there is enough disk space to install them.

In addition, your computer or device may reboot so that the new changes can take affect. After making the above changes launch Visual Studio 2017 again and see if Standard or C++/CLI programs will compile under the same library with the new changes.

 

按照这个方法把本机上的版本号为

技术图片

 

处理了一下,还是没有解决问题,修复VS中

 

以上是关于LNK1104 cannot open the file uuid.lib in VS2017/2019的主要内容,如果未能解决你的问题,请参考以下文章

编译OpenJDK11:fatal error LNK1104: cannot open file ‘kernel32.lib‘

fatal error LNK1104: cannot open file "kernel32.lib"

: fatal error LNK1104: cannot open file "Debug/wwww.exe"怎么回事呀

: fatal error LNK1104: cannot open file "Debug/wwww.exe"怎么回事呀

用C++编程有错误LINK : fatal error LNK1104: cannot open file "Debug/123.exe"如何解决?

c++调试LINK : fatal error LNK1104: cannot open file "Debug/a.exe" 执行 link.exe 时出错.