- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i had recently a problem with this error code : " ifort: error #10037: could not find 'link' "
i search a lot on the intel forum and also on the internet and i don't find anything useful ,so i decide to write an easy instruction to help other people that have same proplem
the problem is associated with link.exe, which intel compiler can 't find it. first you run intel fortran command prompt it shows this message "Setting environment for using Microsoft Visual Studio ". in fact this message is due to calling vcvars32.bat or vcvars64.bat ... depends on which compiler you use, 32 bit or 64 bit..
vcvars32.bat or vcvars64.bat setts the enviroment for compiling and are the keys to solve the problem....
vcvars32.bat or vcvars64.bat finds the location of the file such as link.exe from the registry... when you have error " ifort: error #10037: could not find 'link' " this mean the enviroment can not be set due to this two problem.
1. The adress of visual studio is not located in registry
2. vcvars32.bat or vcvars64.bat cant access registry by any reason
because of it is hard to edit the registry and fining the main problem, you can manually edit the vcvars32.bat or vcvars64.bat by notepad and solve it so easily ....
go to visual studio instalation folder:
c:\\Program Files (x86)\\Microsoft Visual Studio 10.0 // for vista and seven and visual studio 2010
c:\\Program Files\\Microsoft Visual Studio 10.0 // for xp and visual studio 2010
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0 // for vista and seven and visual studio 2008
c:\\Program Files\\Microsoft Visual Studio 9.0 // for xp and visual studio 2008
and open the cvars32.bat or vcvars64.bat by notepad from this locations:
"visual studio adress" \\VC\\bin\\amd64 // for 64 bit compiling
"visual studio adress" \\VC\\bin // for 32 bit compiling
after the first line put this:
for cvars32.bat:
@SET VSINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\
@SET VCINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\
@SET FrameworkDir32=c:\\Windows\\Microsoft.NET\\Framework\\
@Set WindowsSdkDir=c:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\
@SET FrameworkVersion32=v4.0.30319
@SET Framework35Version=v3.5
for cvars64.bat:
@SET VSINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\
@SET VCINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\
@SET FrameworkDir64=c:\\Windows\\Microsoft.NET\\Framework64\\
@Set WindowsSdkDir=c:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\
@SET FrameworkVersion64=v4.0.30319
@SET Framework35Version=v3.5
* iportant* don't forget to put the last backslash of each adresses, else it doesn't work
* for 32 bit windows "Program Files (x86)" is "Program Files"
and in each file delete or comment out this lines:
@call :GetVSCommonToolsDir
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
by changing into
::@call :GetVSCommonToolsDir => ::@call :GetVSCommonToolsDir
:: @if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
::@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
and then save it. if you cant save it, you shoud change the file setting for administrator permission.
thats it, then you will have it.
i search a lot on the intel forum and also on the internet and i don't find anything useful ,so i decide to write an easy instruction to help other people that have same proplem
the problem is associated with link.exe, which intel compiler can 't find it. first you run intel fortran command prompt it shows this message "Setting environment for using Microsoft Visual Studio ". in fact this message is due to calling vcvars32.bat or vcvars64.bat ... depends on which compiler you use, 32 bit or 64 bit..
vcvars32.bat or vcvars64.bat setts the enviroment for compiling and are the keys to solve the problem....
vcvars32.bat or vcvars64.bat finds the location of the file such as link.exe from the registry... when you have error " ifort: error #10037: could not find 'link' " this mean the enviroment can not be set due to this two problem.
1. The adress of visual studio is not located in registry
2. vcvars32.bat or vcvars64.bat cant access registry by any reason
because of it is hard to edit the registry and fining the main problem, you can manually edit the vcvars32.bat or vcvars64.bat by notepad and solve it so easily ....
go to visual studio instalation folder:
c:\\Program Files (x86)\\Microsoft Visual Studio 10.0 // for vista and seven and visual studio 2010
c:\\Program Files\\Microsoft Visual Studio 10.0 // for xp and visual studio 2010
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0 // for vista and seven and visual studio 2008
c:\\Program Files\\Microsoft Visual Studio 9.0 // for xp and visual studio 2008
and open the cvars32.bat or vcvars64.bat by notepad from this locations:
"visual studio adress" \\VC\\bin\\amd64 // for 64 bit compiling
"visual studio adress" \\VC\\bin // for 32 bit compiling
after the first line put this:
for cvars32.bat:
@SET VSINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\
@SET VCINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\
@SET FrameworkDir32=c:\\Windows\\Microsoft.NET\\Framework\\
@Set WindowsSdkDir=c:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\
@SET FrameworkVersion32=v4.0.30319
@SET Framework35Version=v3.5
for cvars64.bat:
@SET VSINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\
@SET VCINSTALLDIR=c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\
@SET FrameworkDir64=c:\\Windows\\Microsoft.NET\\Framework64\\
@Set WindowsSdkDir=c:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\
@SET FrameworkVersion64=v4.0.30319
@SET Framework35Version=v3.5
* iportant* don't forget to put the last backslash of each adresses, else it doesn't work
* for 32 bit windows "Program Files (x86)" is "Program Files"
and in each file delete or comment out this lines:
@call :GetVSCommonToolsDir
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
by changing into
::@call :GetVSCommonToolsDir => ::@call :GetVSCommonToolsDir
:: @if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
::@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
and then save it. if you cant save it, you shoud change the file setting for administrator permission.
thats it, then you will have it.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not recommend editing these files.
As has often been discussed in this forum, the error "cannot find link" is almost always caused by not installing the 64-bit compiler and tools component of Visual Studio. The fix for this is in the Fortran release notes.
As has often been discussed in this forum, the error "cannot find link" is almost always caused by not installing the 64-bit compiler and tools component of Visual Studio. The fix for this is in the Fortran release notes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you are right steve, this article is assummed that users have been installed the vc 64-bit compiler and tools , but as i sea a lot of user claims that they have installed it correctly but they have still problems. i also recomend users to do all steps recomended in forums and if they fail, back up the bat files and then edit them ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But this will just break again for the next update. I'd rather users fix the underlying problem, and I have yet to see a case where there wasn't one. Making edits to the scripts like this could lead to unpredictable effects that can confuse later.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page