【转】G++ 处理 /usr/bin/ld: cannot find -lc
原文网址:http://blog.sina.com.cn/s/blog_67bbb71101010tto.html
用g++编译C++程序时显示出:
/usr/lib/ld: cannot find -lc
/usr/lib/ld: cannot find -lgcc_s
/usr/lib/ld: cannot find -lm
/usr/lib/ld: cannot find -lgcc_s
的错误。在网上看了很多中关于/usr/lib/ld: cannot find -lXXX的解法,但是大同小异,没有很具体的讲解。所以把我的解决方法记录一下。
解决/usr/lib/ld: cannot find -lc:
1. 在系统中搜索 libc.so 文件。搜索出一个无效的链接,删除;还有一个 libc.so.6 ,在/usr/lib/i386-linux-gnu下面。
2. 进入usr/lib目录:cd /usr/lib
3.建立链接:sudo ln -sv /lib/i386-linux-gnu/libc.so.6 libc.so
解决/usr/lib/ld: cannot find -lm:
1. 在系统中搜索 libm.so 文件。搜索出一个 libm.so ,在/usr/lib/i386-linux-gnu下面。
2. 进入usr/lib目录:cd /usr/lib
3.建立链接:sudo ln -sv /usr/lib/i386-linux-gnu/libm.so libm.so
解决/usr/lib/ld: cannot find -lgcc_s:
1. 在系统中搜索 libgcc_s.so 文件。同样在/usr/lib/i386-linux-gnu下面搜索到了libgcc_s.so.1。
2. 进入usr/lib目录:cd /usr/lib
3.建立链接:sudo ln -sv /lib/i386-linux-gnu/libgcc_s.so.1 libgcc_s.so
当某一个链接建立成功的时候,系统显示是类似这样的:
"libgcc_s.so" -> "/lib/i386-linux-gnu/libgcc_s.so.1"
【转】G++ 处理 /usr/bin/ld: cannot find -lc的更多相关文章
- 【解决】/usr/bin/ld: cannot find -lc
现象:运行gcc静态编译程序时报错: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit statusmake: *** [gcc_dr ...
- /usr/bin/ld: cannot find -lc错误原因及解决方法
问题解决 我在执行如下命令的时候,出现了错误. gcc -o main main.c -static -L. –lmylib Linux环境下gcc静态编译/usr/bin/ld: cannot fi ...
- /usr/bin/ld: cannot find -lc
yum install glibc-static [root@test chkrootkit-0.50]# make sensecc -static -o strings-static strings ...
- 编译错误 ----- /usr/bin/ld: cannot find -lc
yum install glibc-static glib-static是Gcc链接时使用到的库.
- linux /usr/bin/ld cannot find 解决
问题: 在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息: /usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的source ...
- 【转】linux /usr/bin/ld cannot find 解决
原文网址:http://blog.csdn.net/mzwang123/article/details/6702889 问题:在linux环境编译应用程式或lib的source code时常常会出现如 ...
- linux /usr/bin/ld: cannot find -lxxx
在linux环境编译应用程式或lib的source code时出现如下错误:/usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的source code 而有不同的 ...
- 关于usr/bin/ld: cannot find -lxxx问题总结
/usr/bin/ld: cannot find -lxxx问题总结 linux下编译应用程序常常会出现如下错误: /usr/bin/ld: cannot find -lxxx ...
- 【转】关于usr/bin/ld: cannot find -lxxx问题总结
原文网址:http://eminzhang.blog.51cto.com/5292425/1285705 /usr/bin/ld: cannot find -lxxx问题总结 linux下编译应用 ...
随机推荐
- 水题~~~~HDU 4788
Description Yesterday your dear cousin Coach Pang gave you a new 100MB hard disk drive (HDD) as a gi ...
- ExtJs 添加员工 实例 ---- 锚点布局 anchor 可自动伸缩
代码如下: <script type="text/javascript"> Ext.onReady(function () { // 创建一条记录行, job 为 di ...
- Normalize.css:优化重置CSS默认属性
Normalize.css:优化重置CSS默认属性 官方网站:http://necolas.github.io/normalize.css/ 项目仓库:https://github.com/necol ...
- 关于WPF中Popup控件的小记
在wpf开发中,常需要在鼠标位置处弹出一个“提示框”(在此就以“提示框”代替吧),通过“提示框”进行信息提示或者数据操作,如果仅仅是提示作用,使用ToolTip控件已经足够,但是有些是需要在弹出的框中 ...
- React Native在虚拟运行app时,报错RCTRootView not found,怎么解决?
报错: 解决方案:
- lamp环境centos5.10,phpprotobuf模块安装,及简单应用
==相关参考== rpm包 http://rpmfind.net/linux/rpm2html/ Linux rpm 命令参数使用详解[介绍和应用] phpize学习 http://blog.sina ...
- 《Effective Java》读书笔记
一.引言 1.几条基本规则:(清晰性和简洁性最为重要) 模块的用户永远也不应该被模块的行为所迷惑(那样就不清晰了),模块要尽可能小,但又不能太小 代码应该被重用,而不是被拷贝 模块之间的依赖性应该尽可 ...
- 求给定数据中最小的K个数
public class MinHeap { /* * * Top K个问题,求给定数据中最小的K个数 * * 最小堆解决:堆顶元素为堆中最大元素 * * * */ private int MAX_D ...
- 如何根据w3wp.exe的进程pid查看是哪个应用程序池
如何根据w3wp.exe的进程pid查看是哪个应用程序池? 根据iisapp 查看PID所对应的IIS应用程序池及详细介绍: 从IIS6.0可以在IIS中架设多个站点并给每个站点指定不同的应用程序池, ...
- qt 5 数据库操作(mysql)
其实大家都知道,QT5以上的都自带了数据库驱动,所以呢,基本上可以直接使用,于是如果想知道怎么连接数据库,请参考这位大神写的.http://qtdebug.com/DB-AccessMySQL.htm ...