xcode 已安装的macOS Montery和gfortran现在显示错误-“ld:YAML文件中不支持的tapi文件类型'!tapi-tbd'”

vtwuwzda  于 2023-01-21  发布在  Mac
关注(0)|答案(1)|浏览(165)

我将我的macOS升级到Monterey 12.3,但我的gfortran代码不再编译。

gfortran -o executable make_executable1.o make_executable2.o

显示此错误消息:

ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
make: *** [fm3d] Error 1

然后,我通过运行以下命令将路径添加到库中:

export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"

现在我得到了这个错误:

ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [fm3d] Error 1

我想这是我的命令行的问题,但我已经重新安装了他们的最新版本的一切,我不能让它工作。

macOS Monterey 12.3
Apple clang version 13.1.6 (clang-1316.0.21.2)
GNU Fortran (GCC) 11.2.0
CommandLine Tools version: 13.3.0.0.1.1645755326

对下一步采取的任何建议将不胜感激!

ylamdve6

ylamdve61#

gfortran @ Monterey 12.6.2可以很好地与Xcode 14.1和Command_Line_Tools_for_Xcode_13.dmg配合使用(但是,它不能与最新的Command_Line_Tools_for_Xcode_14.1.dmg配合使用,导致与您描述的相同错误)

相关问题