在 MacOS 上使用 GPS 时出现错误“ld:未找到 -lSystem 的库”

Sir*_*ter 1 macos gps ada

我正在使用 GPS 对 ADA 进行编程。问题是,当我用 GPS 编译任何代码时,我收到此错误:

ld: library not found for -lSystem collect2: error: ld returned 1 exit status

我已经更新并重新安装了所有内容(xcode、gcc),重新安装了 GPS,并安装了命令行工具。

这就是 GPS 通过终端向我显示的内容:

gprbuild -d -P/Users/pedromarti/Desktop/helloWorld/default.gpr /Users/pedromarti/Desktop/helloWorld/src/main.adb Bind [gprbind] main.bexch [Ada] main.ali Link [link] main.adb ld: library not found for -lSystem collect2: error: ld returned 1 exit status gprbuild: link of main.adb failed gprbuild: failed command was: /users/pedromarti/opt/gnat/2019/bin/gcc main.o b__main.o -L/Users/pedromarti/Desktop/helloWorld/obj/ -L/Users/pedromarti/Desktop/helloWorld/obj/ -L/users/pedromarti/opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib/ /users/pedromarti/opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib/libgnat.a -Wl,-rpath,@executable_path/ -Wl,-rpath,@executable_path/../../..//opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib -o main [2021-03-18 13:38:56] process exited with status 4, elapsed time: 02.57s

我不知道我还能做什么。如果有人知道解决方案,欢迎您!

Sim*_*ght 5

您\xe2\x80\x99正在使用GNAT Community Edition 2019。我可以\xe2\x80\x99t告诉您\xe2\x80\x99正在运行哪个操作系统版本,在这种情况下,我不\xe2\x80\x99t认为这会使一个区别。

\n

下载网站的自述文件说

\n
== Mac OS: Xcode is now needed ==\n\nOn Mac OS, GNAT Community 2019 requires Xcode version 10 or above to be\ninstalled. Once you do have Xcode installed, if you still observe an error\nof the form:\n\n  ld: library not found for -lSystem\n\nthen you might have to execute the following:\n\n  xcode-select -s /Applications/Xcode.app/Contents/Developer\n
Run Code Online (Sandbox Code Playgroud)\n

Xcode 很大但免费,需要一段时间才能从 App Store 下载(转到“开发”选项卡)。

\n