Gnu C Math Libraries
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Nov 29 17:56:22 UTC 2010
On Sun, Nov 28, 2010 at 11:01:48AM -0500, Howard Gibson wrote:
> On Sat, 27 Nov 2010 13:15:10 -0500
> ted leslie <ted.leslie-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>
> > just looked it up
> > to include standard math library
> >
> > -lm
>
> Ted,
>
> Thank you. That worked.
>
> It also works for linking, as long as it is at the end of the command line.
As the man page for floor says:
#include <math.h>
double floor(double x);
float floorf(float x);
long double floorl(long double x);
Link with -lm.
That last line was important. :)
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list