This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -lm not required when including functions from math.h
- From: Harvey Muller <hlmuller at yahoo dot com>
- To: Eljay Love-Jensen <eljay at adobe dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 27 Jun 2008 10:38:10 -0700 (PDT)
- Subject: Re: -lm not required when including functions from math.h
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