Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29236 Discussions

LINK : fatal error LNK1104; cannot open file 'ucrtd.lib' with VS2015

Nathan_K_
Beginner
4,292 Views

This issue is also described here:

https://software.intel.com/en-us/articles/link-fatal-error-lnk1104-cannot-open-file-ucrtdlib-with-vs2015-rc

However, the workaround given in the above link did not solve finding the ucrtd.lib library. For my system the problem is that the default Library directory for ucrtd.lib is $(UniversalCRTSdkDir)Lib\10.0.10056.0\ucrt\x86 which is not correct. On my system his library exists in the directory $(UniversalCRTSdkDir)Lib\10.0.10150.0\ucrt\x86.

To correct the issue I added the library path $(UniversalCRTSdkDir)Lib\10.0.10150.0\ucrt\x86 to Tools>Options>Intel Compilers and Tools>Visual Fortran>Compilers>Win32 tab>Libraries.

I am using Visual Studio 2015 Enterprise and Intel® Parallel Studio XE 2015 Update 4 Composer Edition for Fortran Windows* Integration for Microsoft Visual Studio* 2015, Version 15.0.0122.14.

I hope it will be possible to set the correct default location for this library in future versions of the Fortran Visual Studio integration.

0 Kudos
4 Replies
Steven_L_Intel1
Employee
4,292 Views

It's Visual Studio that determines where this library is to be found. What we see is that sometimes if you had a beta of VS2015 installed that old folders can confuse VS into using the wrong directory. You should delete all but the 10150 folder from under Windows Kits\10.

0 Kudos
Nathan_K_
Beginner
4,292 Views

That's interesting. However, for my system a beta version of VS2015 was never installed. Additionally  the only folder that exists on my system is the 10.0.10150 folder; the 10.0.10056 folder does not exist.

I searched the registry and devenv environment variables for 10.0.10056 to see if I could figure out where 10.0.10056 is coming from. The environment variable for VS2015 correctly identify the location:

UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\

UCRTVersion=10.0.10150.0

I don't seet 10.0.10056 anywhere.

It appears to me that the default values in the Libraries directory list are coming from one of the LibDir value in registry keys created by the Fortran installer:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Intel Fortran\VFToolOpt\150\150.221\IA32_IA32

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intel\Compilers\Fortran\150.221\IA32\VSNet14

HKEY_USERS\S-1-5-21-27163274-1032717099-1190612905-1229\Software\Microsoft\VisualStudio\14.0\Intel Fortran\VFToolOpt\150\150.221\IA32_IA32

Are these registry keys created by Visual Studio or by the Fortran installer?

0 Kudos
Steven_L_Intel1
Employee
4,292 Views

Those are Fortran keys but unrelated to finding ucrtlib.

Try the new 2016 (16.0) version out now. Maybe 15.0.4 didn't do it right.

0 Kudos
Nathan_K_
Beginner
4,292 Views

Steve, thanks, I didn't realize that the release of 16.0 was already available.

When I installed 16.0, the directory for ucrtd.lib is correctly specified using Visual Studio environment variables in Tools>Options>Intel Compilers and Tools>Visual Fortran>Compilers>Win32 tab>Libraries:

$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x86

0 Kudos
Reply