3

I keep getting an error when I build a C++ project in Visual Studio 2017 RC.

1>------ Build started: Project: test, Configuration: Debug x64 ------ 1>Source.cpp 1>LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' 1>Done building project "test.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

OS: Windows 8.1, Visual Studio 2017 Release Candidate

Here is my program:

int main() { } 

I did not set the language to anything special

enter image description here

I searched my whole machine for the file., but could not find it. I have installed Windows SDK 8.1

Update: After the comment from @user1336087

I tried to install Windows SDK 10I get an error:

[14f0:0009][2016-11-23T09:22:20] Package 'Win10SDK_10.0.14393.33,version=10.0.14393.3300' failed to install. Command executed: "C:\ProgramData\Microsoft\VisualStudio\Packages\Win10SDK_10.0.14393.33,version=10.0.14393.3300\packages\Win10SDK\10.0.14393.33\sdksetup.exe" /features OptionId.WindowsSoftwareDevelopmentKit OptionId.WindowsSoftwareLogoToolkit OptionId.NetFxSoftwareDevelopmentKit /quiet /norestart, Return code: -2146889721, Details: The hash value is not correct. 

A workaround seems to have been described here: link But the workaround still fails, even when I uninstall all SDK and install again.

4
  • Maybe this link will help! Commented Nov 23, 2016 at 8:54
  • Actually the Windows SDK 10 installation error that you got is different from the one you referred to in the link. Your error indicates that the file is corrupted. Please try to redownload the Windows SDK 10 and attempt to install it again. Commented Nov 24, 2016 at 4:47
  • It is downloading from Internet when I install it.. Commented Nov 24, 2016 at 6:04
  • but it fails after the download Commented Nov 25, 2016 at 12:21

2 Answers 2

1

It works in the final version of Visual Studio 2017

Sign up to request clarification or add additional context in comments.

Comments

0

This comment here helped me with the same error. It seems having old versions of the Windows SDK present can cause LINK to get confused. Deleting the old version I had fixed the problem.

https://community.intel.com/t5/Intel-Fortran-Compiler/LINK-fatal-error-LNK1104-cannot-open-file-ucrtd-lib-with-VS2015/td-p/1060422

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.