本文介绍了在g ++ linux中找不到-lc和-lm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 找不到-lm 
找不到-lc

我搜索了一下,发现它与的/ usr /斌/ LD 。这是符号链接(我希望) lbd.bdf 。我把这个文件粘贴在某些朋友pc的ubuntu目录中。它没有工作。



我发现 -lc 表示包含静态库libc.a.

类似于 -lm



我在 i386-linux -folders (名称是不同的)。



我尝试了代码块,但发现了相同的错误。

确保

确保你的libpath(g ++)指向libm.a和libc.a所在的目录(使用-L选项)

I am using ubuntu and gcc and g++ were working fine but today it showed:

cannot find -lm
cannot find -lc

I searched and found it has something to do with /usr/bin/ld. which is symlink (i hope) to lbd.bdf. I pasted that file in the directory from ubuntu of some friends pc. It didn't work.

I found that -lc means include static library libc.a.
similarly for -lm

I found them in my i386-linux-folders (name was something different).

I tried code blocks but same errors.

解决方案

make sure that your libpath (in g++) points to the directory(ies) that libm.a and libc.a are located in (use the -L option)

这篇关于在g ++ linux中找不到-lc和-lm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 21:01