Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linker ifort:error#10037:找不到';链接';_Linker_Fortran_Intel Fortran - Fatal编程技术网

Linker ifort:error#10037:找不到';链接';

Linker ifort:error#10037:找不到';链接';,linker,fortran,intel-fortran,Linker,Fortran,Intel Fortran,我下载并安装了以下评估软件: 英特尔并行工作室XE Professional Edition for Fortran Windows。我的系统是64位Windows 7操作系统。在安装过程中,我被要求下载并安装:微软Visual C++ 2013可重新分发(X64)-120.21005< /COD>。p> 我正在尝试使用命令行编译源文件 为了识别命令ifort,我添加了目录: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_

我下载并安装了以下评估软件:
英特尔并行工作室XE Professional Edition for Fortran Windows。
我的系统是64位Windows 7操作系统。在安装过程中,我被要求下载并安装:<代码>微软Visual C++ 2013可重新分发(X64)-120.21005< /COD>。p> 我正在尝试使用命令行编译源文件

为了识别命令
ifort
,我添加了目录:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bin\intel64
指向PATH环境变量。(此文件夹包含文件
ifort.exe

但是,当我试图通过命令编译一个简单的“Hello World”程序时:

ifort hello.for
我得到一个错误:

ifort: error #10037: could not find 'link'
ERROR: Visual Studio 2013 is not found in the system.
但是,创建了文件“hello.obj”

我为修复此错误而尝试的步骤(但没有任何区别): 1) 我试图将目录添加到PATH环境变量:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bin\intel64_gfx
这个文件夹包含文件:
gfx\u linker.exe
,我认为它是所需的链接器

2) 根据Steve Lionel(Intel)在()中建议的4个步骤,我试图更改Visual Studio的配置以添加64位支持,但出现的窗口(在按下控制面板“卸载或更改程序实用程序”中的“更改”选项后)没有显示“x64编译器和工具”复选框选项,只有一个修复按钮选项,这没有什么区别

3) 正如Tim Prince在()中建议的那样,我尝试更新iPort安装。我试图通过“控制面板”中的“卸载或更改程序实用程序”来完成。但在出现的窗口中选择“修复”选项阻止了该过程的完成,因为它指出“修复无法完成,因为找不到可用的源”,并且选择“修改”选项阻止了我在“选择要修改的组件”步骤中的操作(我选择的任何选项都没有启用“下一步”按钮)

4) 在调用ifort之前,我尝试执行cammand:

"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bincompilervars.bat" intel64 vs2013  
正如Steve Lionel(英特尔)在上一个链接中所建议的,但得到了错误:

ifort: error #10037: could not find 'link'
ERROR: Visual Studio 2013 is not found in the system.

现在我已经没有选择了,请求帮助,告诉我如何修复ifort找不到“链接”的错误。

您只需使用
ifort
从命令行编译Fortran文件即可:

开始菜单>程序>英特尔并行studio XE 2O16>英特尔64 visual studio模式
或在开始菜单中搜索
英特尔64

打开英特尔64 visual studio模式。现在,您可以开始使用ifort
ifort
,它会很好地工作

如果您想知道如何调用它(使用的参数),请右键单击
Intel 64 visual mode
,从菜单中选择
open file location

我上传了这些截图,请看一下:

从第二个屏幕截图中,注意传递到批处理文件的参数


注意:根据英特尔文档,第二个参数(
vs2013
)是可选的

我的朋友也有同样的问题。这就是我建议他做的事情,它奏效了。发生这种情况的原因是您错过了
C:\Program Files(x86)\Microsoft Visual Studio 11.0\VC\bin\
中的
link.exe以及其他相关文件夹。因此,您可以使用一个名为的小软件来搜索您的计算机,以确定Microsoft Visual Studio文件夹中是否缺少
link.exe
。如果是这样的话,您可以从其他人那里复制这些文件,或者只需重新安装visual studio并确保所有内容都正确无误。

我也遇到了同样的问题

首先,将“C:\Program Files(x86)\IntelSWTools\compilers\u和\u libraries\u 2016.0.110\windows\bin”添加到路径

现在,从windows命令行运行:compilervars.bat intel64

它在windows命令行上设置环境。
现在,您可以访问“ifort”命令,而不会出现链接错误。

请返回并检查问题。我提到在我的系统中,
ifort hello.for
导致
错误#10037,无法找到链接。在我的计算机中,“英特尔64 Visual Studio 2012”模式的目标是
C:\Windows\SysWOW64\cmd.exe/E:ON/V:ON/K”“C:\Program Files(x86)\Intel\Composer XE 2013\bin\ipsxe comp vars.bat“intel64 vs2012”
。第二个屏幕截图没有显示传递给批处理文件的所有参数。