Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Can't open ucrt.lib

Thomann__Gary
Novice
545 Views

I have IVF19.0.281 and Visual Studio 2019.  Trying to get them to work together on a fortran/C++ mixed language program with no luck at all.  The C++ compiles but the fortran does not.  I used the fortran compiler alone to try to compile the fortran code; after the first obj file was made I get the message 

LINK : fatal error LNK1104: cannot open file 'ucrt.lib'
 

The ucrt.lib is in the windows kits in 10\lib\10.0.18362.0\ucrt\x86\ucrt.lib..  

The library file is dated 3/18/2019.  The compiler knows its there, it simply can't open it.  We have a bunch of fortran projects where we use the Intel fortran and all of them now fail with the same error.

 

Any  ideas?

 

0 Kudos
5 Replies
MWind2
New Contributor I
545 Views

This may help, but it may not be the solution to your problem:

https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/820713

 

JohnNichols
Valued Contributor II
545 Views

try copying the LINK : fatal error LNK1104: cannot open file 'ucrt.lib' file into your project directly -- I have had this problem before usually with wrong windows kits

usually it is a path error - same thng happens with DISLIN on reinstall sometimes 

 

JohnNichols
Valued Contributor II
545 Views

also search on ucrt in forum - Steve gives a lot of useful information on this error in the forum 

All i remember is it is pain till it goes away 

MWind2
New Contributor I
545 Views

This is what I used (pre-link event) to find possible problems:

// environs.cpp : main project file.

#include "stdafx.h"

using namespace System;
using namespace System::IO;
using namespace System::Collections;
int main(array<System::String ^> ^args){
	String ^ sEnv = "Env" + DateTime::Now.ToString("yyyyMMdd_HHmmss")+".txt";
	StreamWriter ^ SWEnv = gcnew StreamWriter(sEnv);
	for each (DictionaryEntry de in Environment::GetEnvironmentVariables()){
		   SWEnv->WriteLine("  {0} = {1}", de.Key, de.Value);
	}
    SWEnv->Close();
    return 0;
}

 

MWind2
New Contributor I
545 Views

The attached is sorted environment code.

Reply