ifort:错误#10037:找不到'link' [英] ifort: error #10037: could not find 'link'

查看:3563
本文介绍了ifort:错误#10037:找不到'link'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载并安装了以下评估软件:
用于Fortran Windows的英特尔Parallel Studio XE专业版。我的系统是64位Windows 7操作系统。在安装过程中,我被要求下载并安装: Microsoft Visual C ++ 2013 Redistributable(x64) - 12.0.21005

我正在尝试使用命令行来编译我的源文件。



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

  C:\程序文件(x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bin\intel64 

添加到PATH环境变量中。 (该文件夹包含文件 ifort.exe )。然而,当我尝试用命令编译一个简单的'Hello World'程序时:

 >  ifort hello.for 

我得到这个错误:

  ifort:error#10037:找不到'link'

但是,文件'hello.obj'已创建。

为了解决这个错误(但没有什么区别),我尝试了以下步骤:



1)我尝试在PATH环境变量中添加以下目录:

$ $ $ $ code程序文件(x86)\IntelSWTools\ compilers_and_libraries_2016.0.110\windows\bin\intel64_gfx

此文件夹包含文件: gfx_linker.exe ,我认为这是需要的链接器。 2)我试图改变Visual Studio的配置以增加64位支持,根据Steve Lionel(英特尔)在4个步骤中所获得的支持( https://software.intel.com/zh-cn/ -us / forums / intel-visual-fortran-compiler-for-windows / topic / 300121 ),但出现的窗口(在按下控制台的'卸载或更改程序实用程序'中的更改选项面板)没有显示'x64编译器和工具'复选框选项,只有修复按钮选项,这没有什么区别。



3)我尝试更新ifort安装, Tim Prince在( https: //software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/280266 )。我试图通过控制面板中的卸载或更改程序实用程序来执行此操作。但是,在窗口中选择'修复'选项,通过声明由于找不到可用来源而无法修复,并选择修改选项,阻止了完成该过程的窗口中的'修复' (我没有选择启用'next'按钮)。

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

 C:\程序文件(x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bincompilervars.batintel64 vs2013 

正如Steve Lionel(英特尔)在前面的链接中所建议的,但遇到了错误:

 错误:系统中找不到Visual Studio 2013。 

现在我没有选择了,请求帮助以告诉我如何解决这个错误ifort无法找到'link'。

解决方案

您可以使用 ifort ,做到这一点:

开始菜单>程序> Intel平行演播室XE 2O16>英特尔64视觉工作室模式或在开始菜单中搜索 Intel 64



打开 Intel 64位视觉工作室模式。现在你可以开始使用 ifort ,它会正常工作。



如果你想知道如何调用它(使用的参数),然后右键点击 Intel 64 visual mode ,从菜单中选择打开文件位置。 p>

我上传了这些屏幕截图,只需看一下:第一张截图第二张截图



从第二张截图中可以看出传递给批处理文件的参数。

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

I downloaded and installed evaluation software of: Intel Parallel Studio XE Professional Edition for Fortran Windows. My system is a 64 bit, Windows 7 OS. During its installation I was asked to download and install also: Microsoft Visual C++ 2013 Redistributable(x64)- 12.0.21005 .

I am trying to compile my source files using the command line.

In order for the command ifort to be recognized, I added the directory:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bin\intel64

to the PATH environment variable . (This folder contains the file ifort.exe).

However, when I try to compile a simple 'Hello World' program by the command:

ifort hello.for

I get the error:

ifort: error #10037: could not find 'link'

The file 'hello.obj' , however, was created.

The steps I tried in order to fix this error (but that made no difference):

1) I tried to add to the PATH environment variable the directory:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bin\intel64_gfx

This folder contains the file: gfx_linker.exe, which I thought is the needed linker.

2) I tried to change the configuration of Visual Studio to add 64-bit support, according to the 4 steps Steve Lionel (Intel) sugested in (https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/300121), but the window that appeared (after pressing the change option in the 'Uninstall or change a program utility' of the control panel) showed no 'x64 compiler&tools' checkbox option, only a repair button option, which made no difference.

3) I tried to update the ifort installation, as Tim Prince suggested in (https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/280266). I tried to do it through the 'Uninstall or change a program utility' in the control panel. But selecting the 'Repair' option in the window that appeared blocked the completion of the process by stating that 'repair cannot be done because no available sources were found', and selecting the 'Modify' option, blocked me in the step of 'selecting components to modify' (nothing I chose enabled the 'next' button).

4) Before calling ifort I tried to execute the cammand:

"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\bincompilervars.bat" intel64 vs2013  

as Steve Lionel (Intel) suggested in the previous link, but got the error:

ERROR: Visual Studio 2013 is not found in the system.

Right now I'm out of options, and beg for help to show me how to fix this error of ifort not being able to find the 'link'.

解决方案

You can simply compile your Fortran files from command line using ifort, to do that:

Start menu > programs > Intel parallel studio XE 2O16 > Intel 64 visual studio mode or search for Intel 64 in the start menu

open Intel 64 visual studio mode . Now you can start to use ifort and it will work fine.

If you want to know how to invoke it (the parameters used) then right click over Intel 64 visual mode, from the menu choose open file location.

I uploaded these screenshots, just take a look: the first screenshot , the second screenshot

From the second screenshot notice the parameters passed to the batch file.

Note: according to Intel documentation the second argument (vs2013) is optional.

这篇关于ifort:错误#10037:找不到'link'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆