00:44p:
Well when I looked in the math.h header - there is no ceil
function/prototype and my linker (included with gcc 3.2.2) says
gcc -std=c99 test.c
/tmp/ccofZXVf.o(.text+0x19): In function `insert':
: undefined reference to `ceil' /tmp/ccofZXVf.o(.text+0x6c): In function
: `insert': undefined reference to `ceil' collect2: ld returned 1 exit
: status
[OT]
That's the linker talking to you, not the compiler. (See that the file is
now in /tmp and has a name no rational human would give it? That's where
the assembler shoved the object code once it had generated it.) The linker
doesn't like that you didn't tell it to link against libm.a, the GNU
Project's math library, and now it can't find ceil. The best way to link
against libm.a is to add the flag -lm to your gcc command line. The
compiler will pass it along to the linker, and the linker will be happy.
Some people consider this to be a mistake in how the GNU Compiler
Collection was designed. I say, it's the price of using a great build
environment.
[/OT]
In any case, this is all massively off-topic here. Try
comp.linux.programmers or some such.