[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't find ceil function in math library
From: |
ingo . krabbe |
Subject: |
Re: can't find ceil function in math library |
Date: |
Thu, 3 Jul 2014 10:28:17 +0200 |
> hi:
> I have a configure.ac file includes: AC_CHECK_LIB([m], [ceil])
> then I got this result: checking for ceil in -lm... no
> but a .c file contains ceil function works very well with or without -lm,
> why is that?
>
> libtool version: 2.4.2
> system: Ubuntu 13.04
Most likely cleil is no function but a define, such as
#define ceil(x) ((int)(x+0.5))
Even more likely the define is more complex than the example I gave, but the
define does exactly what you want. So if you just need the ceil function from
-lm better define it on your own.