[LCP]Missing Prototype in math.h
Hemant Mohan
hemantm at pune.tcs.co.in
Mon Dec 16 20:44:01 UTC 2002
Hi
If I compile the following code segement then I get the warning:
Implicit declaration of the function roundf
**************
#include <math.h>
#include <stdio.h>
int main()
{
float x;
x = roundf( 10.5);
printf("x=%f\n", x);
return 0;
}
**********
I try to compile it using the options
gcc -Wall -lm test.c
Further, on going through the /usr/include/math.h header
I am unable to find the prototype of the roundf function, though the man page
suggests that it should be in the math.h header. Similarly there is no
prototype for round function.
Is it a known issue?
Any comments will be much appreciated.
Thanks,
Hemant
More information about the linuxCprogramming
mailing list