-lm 选项在 g++ 中有什么作用? [英] What does -lm option do in g++?
本文介绍了-lm 选项在 g++ 中有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-lm
选项在g++中有什么作用,什么时候需要?
What does -lm
option do in g++ and when is it needed?
是否有完整的 g++ 选项说明?
Is there a complete description of g++ options?
推荐答案
这是一个链接器选项.它告诉链接器与 (-l
) 链接 m
库 (libm.so/dll).那是数学图书馆.如果您 #include <math.h>
.
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屋!
查看全文