初次用GCC编译,命令如下:(.o文件已成功生成)
gcc -o hello hello.o tool1.o tool2.o
系统回应信息如下:
/usr/bin/ld: error while loading shared libraries:libbfd-2.14.90.0.4.so:cannot open shared object file:No such file or directory
collect2:ld returned 127 exit status
下面是我查GCC版本:
输入 gcc -v 回应
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with:../src/configure -v --enabled-language=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --whith-gxx-include-dir=/usr/include/c++/3.3 .............
Thread model:posix
gcc version 3.3.5(debian 1:3.3.5-13)
查安装路径: which gcc
回应: /usr/bin/gcc
在系统中查找libbfd-2.14.90.0.4.so文件也没有找到。各个源C文件中也没有用到什么头文件。
哪位有解决方法可以告诉兄弟一声, 谢谢了!!!