我在编译一个简单的C程序时遇到错误.
#include<stdio.h> void main() { int i=5; printf("I value is %d",i); }
错误是……
/usr/local/bin/ld: this linker was not configured to use sysroots collect2: error: ld returned 1 exit status
我的gcc版本是..
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Copyright (C) 2012 Free Software Foundation,Inc.
谁能知道我的问题是什么?
解决方法
如果您运行的是binutils的后级,有时会发生这种情况.作为第一步,您需要检查gcc版本的依赖关系并确保它们全部安装完毕.