I am trying to use Intel Parallel Studio 2016 Update 3 on Windows 7. The software installs without errors. However, it fails to build with the following error:
ifort: error #10037: could not find 'link'
The error appears both from the command line and from within Microsoft Visual Studio 2015.
Can someone help me fix this? I have Intel Premier Support. I have tried installing and reinstalling the software. Within MSVS2015, the Fortran files have lost their syntax highlighting and right-clicking a file does not allow compilation of individual files. Hence, the integration into Visual Studio has not correctly taken plan.
The most common cause of this is not installing the 64-bit compiler and tools component for Visual Studio. This is a common oversight with VS2015.
Please review the article Intel® C++ and Fortran Compilers for Windows* Integration Into Microsoft Visual Studio 2015* for details on how to install those and hopefully correct the error.
Thanks, Kevin. However, I am aware of this requirement for Microsoft Visual Studio 2015 and Common Tools for Visual C++ 2015 is installed.
What I was not aware of is that it is also a requirement to run IVF from the command line.
Yes, it is required for building via the command-line and under the MSVS IDE. It provides the underlying linker and additional RTLs needed, and some other tools.
I have tried reinstalling both MSVS2015 and IVF to no avail. The error persists. The required C++ tools are installed. The IVF prerequisites does not flag any errors during installation (as it would if C++ were not installed). Stuck right now as I am unable to use the product on this computer.
I’m sorry to hear about the continued problems.
In addition to Ian’s suggestion,
Regarding Fortran syntax-highlighting and Fortran files not compiling, the article Problem: Fortran source files not compiled when building in Visual Studio contains details about Microsoft Visual Studio settings that you can double-check are enabled. What you find is or is not set might shed additional clues about the successful integration into MSVS.
The article Troubleshooting Fortran Integration Issues with Visual Studio contains additional advices on items to check on and steps to try repairing the integrations.
I can request our install Developers help with reviewing installation logs to see whether something is silently gone wrong with the installation leading to the issue. You can collect those logs by looking in your TEMP directory (In a directory window type %TEMP% in the address bar) for a folder with a name starting with pset_ and ending with your username. Inside there will be folders from recent install attempts. If you will zip up the latest one and send it to us then we can look into that.
Thanks, Ian and Kevin. I am attaching all the relevant files requested. This has been a problem for me for several years - I buy/renew a license every year and I am never sure whether it is going to work - usually a few tries are required. Everything seems to be in order and the previous version of the compiler was working correctly.
What is confusing this time is that the install does not generate any errors. If C++ is not installed or VS2015 is not correctly installed, the VF installer gives you an error message.
Thank you for the details. From what you have shown the Intel compiler installation appears to have been successful. The VS integration info and other settings also appear correct. The ifort compiler (command-line) appears to work. I can’t fully discern the link error under the VS IDE but that doesn’t appear related to not finding the linker.
Have you tried building an IA-32 VS only C/C++ simple test case under the IDE? How about via the command-prompt?
I noted you used an “IA-32 Visual Studio” command-prompt window which doesn’t appear to be an Intel compiler command-prompt. I would not have expected ifort to be found. Did you do any sort of manual initialization of that command-prompt window?
Within your command-prompt window, you should be able to see this variable:
C:> echo %VSINSTALLDIR%
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\
And based on that setting, you should find link.exe under “VC\BIN” as follows:
C:\> dir "%VSINSTALLDIR%\VC\BIN\link.exe"
Volume in drive C is OSDisk
Volume Serial Number is BE8D-92CE
Directory of C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN
06/25/2015 11:34 PM 927,376 link.exe
1 File(s) 927,376 bytes
0 Dir(s) 5,754,290,176 bytes free
If you do not see link.exe, can you confirm that you have installed IA-32 C++ and tools?
Another possibility is the PATH setting that IanH inquired about. Under your command-prompt, can you echo %PATH% and show us that?
Thanks, Kevin - much appreciated.
1. Attached is the PATH as a text file.
2. Also, attached is the echo %VSINSTALLDIR% although there was no output. I am attaching a snapshot of the VC/bin directory and link.exe is installed.
3. I ran a C++ program implementing a numerical technique and it works fine.
4. Regarding "I noted you used an “IA-32 Visual Studio” command-prompt window which doesn’t appear to be an Intel compiler command-prompt. I would not have expected ifort to be found. Did you do any sort of manual initialization of that command-prompt window?" ...
Please see attached folder structure under Intel VF ... There are a few command prompts here including the one I used. I was only testing the compiler - normally I don't use the command line.
Thanks, Kevin - much appreciated.
1. Attached is the PATH as a text file.
How did you get that text file for PATH? Was it obtained from a command prompt by doing something like `echo%PATH > some_file.txt`? If it was, the unexpanded environment variables indicates that your system path is too long. If it was not, try that echo command, perhaps just from a boring non-intel/vs command prompt and see what the PATH looks like. Try it also from an Intel Fortran command prompt.
(Unrelated, but be mindful that MATLAB distributes (or at least used to) its own copies of the Intel Fortran runtime DLL's. Having MATLAB ahead of a compiler redistributable directory in your PATH will then result in problems if you are using a version of the Fortran compiler that is later than the version used when MATLAB was built. At present, in what you have shown, the redistributable directories are ahead of the MATLAB directories, but that can change when software gets updated. Some AspenTech products may do similar evil things.
Depending on where this PATH string came from/how things were installed, the intel software directory right at the end is a little odd. Did you add that yourself?)
Thanks, Ian. The text file was created by copying the path variable from Control Panel/System. I deleted the last few entries that are company confidential and which were added by me. As a result the Intel Fortran is the last directory in path, which I add myself. This compiler is also used by AspenPlus, which requires a separate "integration of IVF into AspenPlus" to be run and one that needs the path variable added.
Some good news! As I write this, I deleted the last path variable related to IVF and now IVF is working again in VS2015. Somehow this was never a problem in the earlier versions since the path variable has always been updated. I also ran the AspenPlus compiler integration and it recognized IVF correctly.
However, it is not running from the command line. Compilation takes place but not linking.
If your system path is too long, many things stop working correctly. I suspect that is all that is going on, particularly if the actual system path was longer than what was attached in #12. A secondary issue might be interaction of things like AspenPlus with your environment.
You should not need to (and should not) manually add any Fortran related paths to your system or user paths if you are working from within Visual Studio or from a Intel Fortran command prompt. The compiler/redistributable installation automatically adds paths to the directories under Common Files that have the latest runtime libraries - the %INTEL_DEV_REDIST% stuff - leave those there.
It has been some years since I had to work with Aspen Plus (but the scars are yet to fade), so I cannot remember the arrangement that I used, but I would be more inclined to dynamically set up a suitable command prompt by calling things like the "ipsxe-comp-vars.bat" script (or whatever it is for your version/edition of Fortran - have a look at what a Fortran command prompt runs) than hard code the path into the PATH variable. (Alternatively, you might also be able to invoke the similar AspenPlus batch file from within a Fortran command prompt.)
Note that you have some duplicate entries in what was attached in #12. Because the system path length is a material constraint, you should delete the duplicates. I would also suggest reviewing whether all the entries that are in the system path need to be there - perhaps some would be more appropriate in the user path. A remarkable number of applications have an overinflated view of their importance to the system and demonstrable ignorance around the ways and means to locate things like their private DLL's without having to infect global system settings.
(Similar comments apply to the user path, which is supposed to be something for users to set up as they wish, not for applications to mess with.)
If you are still having trouble compiling and linking from an Intel Fortran command prompt, then provide more information about the environment, particularly PATH, that is realized within that command prompt.