GCC -lm -lz -lrt选项 - 他们是什么? [英] GCC -lm -lz -lrt options - what are they about?

查看:4655
本文介绍了GCC -lm -lz -lrt选项 - 他们是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,这些是一些通用/基本库,但它们是什么意思?

I know, that these are some common/basic libraries, but what do they mean exactly?

例如,我知道 -lm 是一些数学库,但这是标准的数学库什么?

For example, I know, that -lm is some math library, but is this the standard math library or what?

-lz 用于压缩?什么压缩?

-lz for compression? What compression?

我不知道这是什么 - -lrt

And I don't have any idea what is this one - -lrt.

有人可以指定以下内容:

Can someone specify these things:


  • 数学库 - 当我们使用< cmath> < math.h>

  • compress library - 这是什么意思 - 提供了一些工具,我们可以用它来压缩文件,或者帮助编译器/链接器做一些压缩工作?

  • math library - the same that we use when we include <cmath> or <math.h>?
  • compress library - what does this mean - provides some tools, that we can use to compress files, or helps the compiler/linker to do some compress-things?

推荐答案


  • -lz 是zlib, http://zlib.net/

  • -lm - 是您制定的数学库(实施定义的AFAIK)

  • -lrt - 提供POSIX实时扩展程序: http: //www.s-gms.ms.edus.si/cgi-bin/man-cgi?librt+3LIB

    • -lz - is zlib, http://zlib.net/
    • -lm - is the math library as you've worked out (implementation defined AFAIK)
    • -lrt- provides POSIX realtime extensions: http://www.s-gms.ms.edus.si/cgi-bin/man-cgi?librt+3LIB
    • 这篇关于GCC -lm -lz -lrt选项 - 他们是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆