在Linux Mint中编译C程序时出错

Siv*_*iva 5 c ubuntu gcc ld

我在编译一个简单的C程序时遇到错误.

#include<stdio.h>
void main()
{
      int i=5;
printf("I value is %d",i);
}
Run Code Online (Sandbox Code Playgroud)

错误是......

/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

我的gcc版本是..

gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
Run Code Online (Sandbox Code Playgroud)

谁能知道我的问题是什么?

pax*_*blo 1

如果您运行的是后台级别的binutils. 作为第一步,您需要检查您的gcc版本的依赖项并确保它们全部安装。