加入收藏 | 设为首页 | 会员中心 | 我要投稿 辽源站长网 (https://www.0437zz.com/)- 云专线、云连接、智能数据、边缘计算、数据安全!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

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

发布时间:2021-01-02 03:30:57 所属栏目:Linux 来源:网络整理
导读:我在编译一个简单的C程序时遇到错误. #includestdio.hvoid main(){ int i=5;printf("I value is %d",i);} 错误是…… /usr/local/bin/ld: this linker was not configured to use sysrootscollect2: error: ld returned 1 exit status 我的gcc版本是.. gcc (

我在编译一个简单的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版本的依赖关系并确保它们全部安装完毕.

(编辑:辽源站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读