-lm not required when including functions from math.h
Harvey Muller
hlmuller@yahoo.com
Fri Jun 27 17:38:00 GMT 2008
Eljay,
That helped enormously, thanks for the pointer. They are indeed built into the
compiler. Now I know to use -fno-builtin and -lm if I specifically want to use libm.a,
and more importantly, why.
Best regards,
Harvey
----- Original Message ----
> From: Eljay Love-Jensen <eljay@adobe.com>
> To: Harvey Muller <hlmuller@yahoo.com>; GCC-help <gcc-help@gcc.gnu.org>
> Sent: Friday, June 27, 2008 1:06:32 PM
> Subject: Re: -lm not required when including functions from math.h
>
> Hi Harvey,
>
> Some math functions are built into the compiler.
>
> Some math functions are macros in the math.h header.
>
> Some platforms include -lm (or the analogous equivalent) for you.
>
> HTH,
> --Eljay
More information about the Gcc-help
mailing list