-lm选项在g ++中做什么? [英] What does -lm option do in g++?
本文介绍了-lm选项在g ++中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在g ++中做什么 -lm
选项在什么时候需要?
有没有完整的描述的g ++选项?
解决方案
这是一个链接器选项。它告诉链接器链接( -l </ code>)
m
库(libm.so/dll)。这是数学库。如果您 #include
,您经常需要它。
What does -lm
option do in g++ and when is it needed?
Is there a complete description of g++ options?
解决方案
That's a linker option. It tells the linker to link with (-l
) the m
library (libm.so/dll). That's the math library. You often need it if you #include <math.h>
.
这篇关于-lm选项在g ++中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文