我下载了 GNAT Community 2019 并安装在我的 Mac 上的主文件夹“/Users/leon/opt/GNAT”中
我在目录“/Users/leon/opt/GNAT/2019/bin”中运行命令“gps”。GPS出现了,然后我创建了一个项目,输入了“Hello World”代码。正如Wikibook显示的那样。
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
当我单击构建按钮时,程序构建失败。
以下是建筑输出。
gprbuild -d -P/Users/leon/Documents/ada/helloworld.gpr /Users/leon/Documents/ada/src/hello.adb
Compile
[Ada] hello.adb
Bind
[gprbind] hello.bexch
[Ada] hello.ali
Link
[link] hello.adb
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
gprbuild: link of hello.adb failed
gprbuild: failed command was: /users/leon/opt/gnat/2019/bin/gcc hello.o b__hello.o -L/Users/leon/Documents/ada/obj/ -L/Users/leon/Documents/ada/obj/ -L/users/leon/opt/gnat/2019/lib/gcc/x86_64-apple-darwin17.7.0/8.3.1/adalib/ /users/leon/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 hello
[2020-02-28 22:36:48] process exited with status 4, elapsed time: 00.79s
请帮忙。我无法弄清楚配置有什么问题或其他什么。先感谢您。