rint compilation error

After upgrading to QNX 6.1, cc gives the error “implicit declaration of
function int rint(…)” even though I am including <math.h>. What is
the problem here? It worked ok in 6.0 B.

Bruce Davis <bruce.r.davis@boeing.com> wrote:

After upgrading to QNX 6.1, cc gives the error “implicit declaration of
function int rint(…)” even though I am including <math.h>. What is
the problem here? It worked ok in 6.0 B.

I don’t have any problems with using rint() on 6.1.0A system.
Can you build the sample from the helpvier?
What OS version do you have? (“uname -a”)
Can you post a simple test case?

Thanks.

Best Regards,

Marcin

In article <3C07F4E4.32D76D3A@boeing.com>,
Bruce Davis <bruce.r.davis@boeing.com> writes:

After upgrading to QNX 6.1, cc gives the error “implicit declaration of
function int rint(…)” even though I am including <math.h>. What is
the problem here? It worked ok in 6.0 B.

rint isn’t ansi standard C, although it is standard unix and so should
probably be in the math.h header. Use ceil and floor instead.

Tom