saidasa
saidasa

Reputation: 11

Explain the linker flag "-lm"

Could someone explain the meaning of linker flag "-lm". Which library is being represented by the letter "m". If "m" is not a library name what is it then.

Upvotes: 0

Views: 551

Answers (1)

William McBrine
William McBrine

Reputation: 2256

It depends on your system, but traditionally, libm is the math library. Here is where you'll find things like trig functions, square root, and other floating point operations.

Upvotes: 2

Related Questions