GCC -lm -lz -lrt options - what are they about?

后端 未结 5 1033
猫巷女王i
猫巷女王i 2021-02-12 13:36

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

For example, I know, that -lm is some math library, but is this the st

5条回答
  •  温柔的废话
    2021-02-12 14:17

    The switch -lX generally means to load the library libX.so.

    libm is the standard math library; it contains sin(), cos(), atanh(), all that good stuff.

    libz is Zlib, a compression library which can do gzip, deflate, and a few other formats.

    There are a couple of different librt's out there: one is the POSIX realtime extensions; another is a library of general-purpose programming aids.

提交回复
热议问题