g95 ld:找不到-lcrt1.o的库 [英] g95 ld: library not found for -lcrt1.o

查看:89
本文介绍了g95 ld:找不到-lcrt1.o的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Macbook Pro机器上的Mac OSX 9中使用g95编译Fortran代码.

I am trying to compile Fortran code using g95 in Mac OSX 9 on a Macbook Pro machine.

编译器出现以下错误

ld: library not found for -lcrt1.o

我已经尝试按照上一个问题 Fortran编译器损坏中的建议安装gcc47 ,但这并没有工作.

I've tried installing gcc47 as suggested in previous question Fortran compiler broken but this doesn't work.

推荐答案

仅使用-c参数是不理想的,因为那样就只能得到目标文件,而不是可执行文件.

Just using the -c argument is not ideal, as then you just get the object file, and not the executable.

我遇到了完全相同的问题,并在从App Store安装了xcode之后(还记得记得打开它并同意其条款和条件),通过安装其他命令行工具来解决了这个问题.

I had the exact same problem, and ended up solving it by installing the additional command line tools after having installed xcode from the App Store (and also having remembered to open it and agreed to its terms and conditions).

在命令行中输入: xcode-select --install

似乎这会安装丢失的文件.

It seems that this installs the file that was missing.

这篇关于g95 ld:找不到-lcrt1.o的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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