math library in gcc

Posted by Betamoo on Stack Overflow See other posts from Stack Overflow or by Betamoo
Published on 2010-05-17T10:22:18Z Indexed on 2010/05/17 10:30 UTC
Read the original article Hit count: 347

Filed under:
|
|
|
|
  • I am writing a program on linux gcc...
  • 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

© Stack Overflow or respective owner

Related posts about c

    Related posts about unix