Referring the undefined reference to ceil()
:
You seem to be missing to link against libm
.
Adding the option -lm
to your call to gcc
should solve this problem.
#include
ing math.h
is for the compiler to get to know ceil()
's defintion. The linker then later needs to know where ceil()
's implementation actually resides, namely in libm
.