I did the following code using ceil()
#include<stdio.h>
#include<math.h>
int main()
{
float val;
float cVal;
val=23.4;
cVal =ceil(val);
printf("ceil value:%f\n",cVal);
return 0;
}
I am getting th following error
In function main':
test1.c:(.text+0x1b): undefined reference to
ceil'
collect2: error: ld returned 1 exit status
What is wrong in this code??Please help!
I compiled it using makefile
>>cmake .
>>make
>>./hello.out