我在尝试构建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)发布于 2014-07-24 16:27:00
这通常是安装过程中出现问题的标志。删除安装(/usr/gnat)并重新安装可能会解决此问题。答案来得很晚,但希望对以后看到同样问题的其他人有用。
https://stackoverflow.com/questions/20288324
复制相似问题