When I tried to include <math.h>
I found that I need to link math library by using command gcc -lm
But I am searching for another way to link the math library 'in code', that does not require the user to compile using any options..
Can gcc -lm
be done in C code using #pragma
or something?
EDIT: I have changed -ml
to -lm
The usual way to simplify complication for the user (or indeed for the developer) is to write a makefile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With