make:f77:没有这样的文件或目录 [英] make: f77: No such file or directory
问题描述
<$ c在试图编译/编译grafic包的同时,我在调用make命令后看到这个错误: $ c> f77 -O2 -c grafic1.f
make:f77:没有这样的文件或目录
make:*** [grafic1.o]错误1
我安装了XCode和所有相关的命令行工具,可能会导致此错误?
f77 $ h2_lin>解决方案 C $ C>。有两件事你需要看看这个问题:
包。 一旦你安装了编译器,你的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:
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 thegcc
package.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 lineFC=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屋!