eclipse - 如何在 macOS Big Sur 上的 Eclipse 12s IDE(科学)中构建 fortran 代码
问题描述
我在我的 MacBook 上下载并安装了 Scientific Eclipse (2020 -12s) 但我的“Hello, World!” 代码不会构建。我怀疑下面的错误意味着找不到我的 GNU FORTRAN (gfortran),但 PATH 变量中有 /usr/local/bin 。谷歌博士没有找到任何解决这个问题的答案。我无法在 Eclipse 文件中找到任何地方来专门添加路径。在终端中调出“sh”并输入“gfortran”会导致“无文件”的预期错误。
% which gfortran
/usr/local/bin/gfortran
代码:
program Hello
implicit none
print *, 'Hello, World!'
end program Hello
Eclipse 构建错误:
11:55:48 **** Build of configuration Debug for project Learn ****
make all
Building file: ../Hello.f90
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o "Hello.o" "../Hello.f90"
/bin/sh: gfortran: command not found
make: *** [Hello.o] Error 127
"make all" terminated with exit code 2. Build might be incomplete.
解决方案
推荐阅读
- sql - 带索引的唯一名称
- javascript - 在调暗背景(内容和所有)的同时,在最前面显示和放大点击的图像
- dataframe - Pyspark:如何用来自不同数据帧的另一列替换一个数据帧的列(列名相同)
- azure - 如何从 Azure Service Fabric 群集中删除活动证书?
- spring-boot - JBOSS 7,2 带有打开的 JDK 并且在 JVM 重新启动时会关闭 Spring Boot War
- html - Bootstrap - 基于 Div 容器的图像居中并自动调整宽度和高度大小的轮播
- powershell - 是否可以使用经典 UI 在 for 循环中运行 Azure DevOps 管道任务?
- azure - 我们可以通过 ADF 将 json 数组解析并复制到多个 sql 表中吗
- python-3.x - 将子图向同一方向移动
- javascript - js 新手 - 了解 async await 语法