如何在 Mac OS X 10.6 上安装 f77
谁能告诉我如何在 Mac OS X 10.6 上安装 f77 ?我对f77还很陌生。
非常感谢
Can anyone tell me how to install f77 on Mac OS X 10.6? I am quite new to f77.
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
因此,您正在寻找的编译器是 gfortran,它是 gcc 套件的一部分。 Gfortran 将编译旧的 f77 代码,但它也会编译同一语言的更现代的(Fortran90、95、2003 和某些 2008 支持)版本;如果您要开始研究某人的旧 f77 代码,我强烈建议您了解更现代版本的 Fortran 是什么样的。情况有了很大改善。您可能会看到安装 g77 的选项,这是上一代的 gnu fortran 编译器 - 不要这样做。它已有 5 年历史,并且已经 4 年没有得到支持。
至于安装 gfortran,您有多种选择:
MacPorts 是 Linux 软件的一个重要来源在你的Mac上;它为您的机器构建东西,因此安装可能需要一些时间。安装 macports 二进制文件后,您可以键入“sudo port install gcc46 +gfortran”来安装最新的 gcc 和 gfortran 编译器。
二进制文件可从 HPC for Mac OS X 网站获取。我认为这些是 4.5 版本中比较旧的二进制文件。我还没有在那里尝试过 gfortran 二进制文件,但该网站通常是可靠的。
gcc wiki 指出仍然在其他地方适用于 Mac OS X 的 4.5 二进制文件。
So the compiler you're looking for is gfortran, part of the gcc suite. Gfortran will compile old f77 code, but it will also compile more modern (Fortran90, 95, 2003, and some 2008 support) versions of the same language; if you're going to start working on someone's old f77 code I strongly suggest you learn about what more modern versions of fortran look like. Things have improved greatly. You may see options to install g77, which was the previous generation of gnu fortran compilers -- don't do it. It's 5 years old and hasn't been supported for 4 years.
As to installing gfortran, you have several options:
MacPorts is one great source for linux software on your mac; it builds things for your machine, so installing can take some time. Once you've installed the macports binaries, you can type "sudo port install gcc46 +gfortran" to install the newest gcc and gfortran compilers.
Binaries are available at the HPC for Mac OS X website. I think these are modestly older binaries for 4.5. I haven't tried the gfortran binaries there, but that website is usually reliable.
The gcc wiki points still elsewhere for 4.5 binaries for Mac OS X.
英特尔还根据非常具体的非商业许可向 OS X 和 Linux 用户免费提供其编译器。如果您打算以符合其许可条款的方式使用 Fortran,则可以从他们那里安装它。他们有一个非常好的 OS X/Linux 编译器支持论坛,包括安装说明。
Intel also provides their compiler to OS X and linux users for free under a very specific non-commercial license. If you are going to be using Fortran in a way that is compliant with their licensing terms you can install it from them. They have a pretty good support forum for their OS X/Linux compiler including install directions.