Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the math library linked statically?

I was under the impression that the math library is linked statically because -l name links to libname.a, however if I try to compile with the -static flag, suddenly GCC can't find the math functions.

Does this means that math is not necessarily linked statically? Or is something else is going on here?

like image 658
EpsilonVector Avatar asked Nov 30 '25 16:11

EpsilonVector


1 Answers

If it would compile statically you would write gcc libname.a instead of gcc -l libname.

And to your question, yes math library is linked dynamically.

like image 100
Šimon Tóth Avatar answered Dec 02 '25 07:12

Šimon Tóth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!