0

尝试构建 sdc 教程文件时出现链接错误。我已经使用安装脚本安装了 gnat gpl。.o 文件存在于 /usr/lib/x86_64-linux-gnu 中。如何配置让链接器看到?我试过添加到路径中。

这是输出:

gnatmake -d -P/home/steve/workspace/ada/tutorial/sdc.gpr -XBuild=DEBUG sdc.adb
gnatbind -static -x /home/steve/workspace/ada/tutorial/obj/sdc.ali
gnatlink /home/steve/workspace/ada/tutorial/obj/sdc.ali -g -o /home/steve/workspace/ada/tutorial/obj/sdc
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld: cannot find crt1.o: No such file or directory
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld: cannot find crti.o: No such file or directory
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld: cannot find -lc
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
gnatlink: error when calling /usr/gnat/bin/gcc
gnatmake: *** link failed.
[2013-11-29 08:47:55] process exited with status 4 (elapsed time: 00.21s)
4

1 回答 1

0

This is in general a sign that there was a problem during the installation. Removing your install (/usr/gnat) and reinstalling might fix the issue. The answer comes late, but hopefully will be useful to someone else seeing the same issue later on.

于 2014-07-24T08:26:59.980 回答