make:f77:没有这样的文件或目录 [英] make: f77: No such file or directory

查看:571
本文介绍了make:f77:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <$ c在试图编译/编译grafic包的同时,我在调用make命令后看到这个错误: $ c> f77 -O2 -c grafic1.f 
make:f77:没有这样的文件或目录
make:*** [grafic1.o]错误1

我安装了XCode和所有相关的命令行工具,可能会导致此错误?

make 告诉你在你的路径中没有二进制文件,名为 f77 解决方案 C $ C>。有两件事你需要看看这个问题:


  1. 您是否安装了Fortran编译器? MacOS X / Xcode默认不预装一个。安装一个最简单的选项是通过第三方工具,如 macports 自制软件,您可以在其中安装 gfortran ,这可能是一个独立的软件包,也可能是<$ c $的一部分c> gcc 包。

  2. 一旦你安装了编译器,你的makefile需要知道它。在没有看到makefile的情况下,这只是一个假设,但是如果不使用自动工具,Fortran编译器通常会在名为 FC 的变量中进行硬编码,你可能会看到一行

      FC = f77 

    ,您可以将其更改为

      FC = gfortran 
    code>

    假设 gfortran 在您的路径中。


一旦你安装了Fortran编译器并且makefile知道它,你应该能够执行 make 成功。


Whilst attempting to make/compile the grafic package, I'm seeing this error after calling the make command within the grafic directory:

f77 -O2 -c grafic1.f
make: f77: No such file or directory
make: *** [grafic1.o] Error 1

I have XCode and all associated command line tools installed, what could be causing this error?

解决方案

This error is make telling you that you have no binary in your path called f77. There are two things you need to look at the fix this:

  1. Do you have a Fortran compiler installed? MacOS X/Xcode does not come pre-installed with one by default. The easiest options to install one are via third-party tools like macports or homebrew where you can install gfortran which may be a standalone package or may be part of the gcc package.

  2. Once you have a compiler installed, your makefile needs to know about it. Without seeing the makefile this is only an assumption, but if autotools are not used the fortran compiler is usually hardcoded in a variable called FC, e.g. you might see a line

    FC=f77
    

    and you would change this to

    FC=gfortran
    

    assuming gfortran is in your path.

Once you have a Fortran compiler installed and the makefile knows about it, you should be able to execute make successfully.

这篇关于make:f77:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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