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

Can't open ucrt.lib

Thomann__Gary
Novice
1,190 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 III
1,190 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

 

0 Kudos
JohnNichols
Valued Contributor III
1,190 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 

 

0 Kudos
JohnNichols
Valued Contributor III
1,190 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 

0 Kudos
MWind2
New Contributor III
1,191 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;
}

 

0 Kudos
MWind2
New Contributor III
1,191 Views

The attached is sorted environment code.

0 Kudos
Reply