【发布时间】:2023-01-19 02:58:13
【问题描述】:
我将我的 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
我认为这是我的 CommandLine 的问题,但我已经将所有内容重新安装到他们的最新版本,但我无法让它工作。
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
对下一步采取的任何建议将不胜感激!
【问题讨论】:
标签: xcode gfortran command-line-tool macos-monterey