如何在Mac OS X中使用ifort [英] How to use ifort in mac osx

查看:711
本文介绍了如何在Mac OS X中使用ifort的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上使用Intel fortran编译程序时遇到问题.我的文件夹中有一个Makefile,当我使用make命令时,出现以下错误:

I have a problem compiling a program with Intel fortran on my Mac. I have a makefile in a folder and when I use make command, I get the following error:

ld: library not found for -lcrt1.10.6.o 
make: *** [../BIN/double_par_TMATRIX] Error 1 

我发现此链接提到了可能的解决方案,但我不知道如何应用它.

I found this link which mentions a possible solution, but I don't know how to apply it.

https://software.intel.com/zh-cn/articles/library-not-found-for-lcrt1105o

根据此链接,解决方案是将GNU C/C ++编译器选项-mmacosx-version-min=10.4添加到编译命令行.但是我不知道这个解决方案到底意味着什么.

According to this link, the solution is to Add GNU C/C++ compiler option -mmacosx-version-min=10.4 to the compilation command line. But i don't know what this solution means exactly.

我安装了Mac OS X 10.9.5,并安装了Xcode 5.1.1. 有人知道我应该如何添加此选项吗?

I have mac os x 10.9.5 and I have xcode 5.1.1 installed on it. Do anyone knows how should I add this option?

谢谢

推荐答案

您要将-mmacosx-version-min=...选项添加到flags.我猜您要执行-mmacosx-version-min=10.9,因为您使用的是OSX 10.9.5.因此,您应该最终得到:

You want to add the -mmacosx-version-min=... option to flags. I'm guessing you want to do -mmacosx-version-min=10.9 because you're on OSX 10.9.5. So you should end up with:

ifeq ($(compilemode),release)
  flags   := $(flags_1) -parallel -openmp -O3 -xT -axT 
else
  flags   := $(flags_1)
endif
flags += -mmacosx-version-min=10.9


更新:尝试注释掉或删除调用ld的行.看起来好像不属于那里:


UPDATE: Try commenting out or removing your line calling ld. It doesn't look like it belongs there:

ld -mmacosx-version-min=10.6

这篇关于如何在Mac OS X中使用ifort的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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