I have VS 2015 Professional 2015, Update 3, and I have Visual Fortran XE 188.8.131.52. All of my Fortran programs are compiling fine, but then giving me the link error: LNK1104: cannot open file 'libucrt.lib'.
It appears as though the problem lies in the setting for the libraries as to where the libucrt.lib file resides. When I look at the list of libraries in the Tools-->Options-->Intel Compilers and Tools-->Visual Fortran-->Compilers-->Libraries, it has hard-coded in the path $(UniversalCRTSdkDir)Lib\10.0.10056.0\ucrt\x86. But that directory does not exist on my machine. The problem is the number "10.0.10056.0". If I change that to a directory that actually exists on my machine (e.g., 10.0.10150.0, or 10.0.10240.0), then things work and compile just fine.
My question is two fold:
1) Where did the incorrect path (10.0.10056.0) come from?
2) Are we doing something wrong in the installation that could be causing this error? We are in the middle of rolling out new installations for many people in the office, and it would be a big pain to have to go to each person and correct the settings one by one.
Thanks for your help.
This generally happens when an update is installed after a VS2015 update. The usual fix is to click "Reset..." on that Tools > Options dialog. Once you fix it this way, it should stay fixed. But I would also recommend a newer version of Parallel Studio XE, as 15.0.4 was the very first to support VS2015 and there might have been issues there.
When I click on the reset button, the path doesn't change. It still says: $(UniversalCRTSdkDir)Lib\10.0.10056.0\ucrt\x86
The 10.0.10056.0 is still hard-coded in there. Am I missing something?
I think that 15.0.4 made some assumptions based on the beta versions of VS2015. Try adding:
for x86 and:
to the list (or replace the bad path with this.) My memory is a bit foggy now, but my recollection is that later versions of Parallel Studio XE used the newer path.
I tried adding that to the list, but it came back with the same link error, and also said:
Project : warning PRJ0018 : The following environment variables were not found:
I'll see if we have a newer version of the compiler that we can install.
Actually, that directory is already in the list. It doesn't work because I don't have a $(UniversalCRTSdkDir)lib\winv10.0 directory.
We are looking into installing a newer version of Fortran. We can't find anything newer within the Fortran XE 2015 world. We tried Fortran XE 2016 (I think) and XE 2017, but they didn't seem to not be compatible with VS 2015. Can you recommend a specific version that we should try?
Yes, the XE 2016 and 2017 versions are compatible with VS2015.
On my system, the library is in C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64 (for x64). See where yours are and substitute as needed.
Ok, that's good to know that XE 2016 and XE 2017 are supported with VS 2015. Maybe something just didn't go right with those installations. We should retry that.
Yes, I can manually change the library path to a path that exists on my machine, and then programs compile and link. But we are trying to install this software for many, many users, and so that seems odd to have to do that extra manual step for each user. We assumed something just isn't going correctly with the installation. I'll look into seeing if we can use XE 2016 or XE 2017, and if that resolves the issue.
If we install XE 2017, can we use all the default installation options, or do we need to do a custom install. I recall reading, a while back, about needing to do a custom install to make sure to install the C++ components. But I'm not sure if that's still necessary.