小编DdD*_*i20的帖子

无法在 MacOS Monterey 上编译 fortran:ld:YAML 文件中不支持的 tapi 文件类型“!tapi-tbd”

每当我尝试编译 Fortran 代码时,都会遇到错误:

% gfortran Testing_Fortran.f90 -o Testing_Fortran

ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libSystem.tbd' for architecture x86_64 collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

通过互联网查看类似问题,我发现最常见的解决方案是降级 XCode 命令行工具,并重新安装 gcc,但这些都不起作用。

我尝试了 CLTools 14.1 和 13.4,并且通过自制程序安装 gcc。gfortran 版本是 12.2.0。我使用的是 MacOS Monterey 12.6。

有任何想法吗?提前致谢。

gcc ld gfortran xcode-command-line-tools macos-monterey

7
推荐指数
2
解决办法
4616
查看次数