Re: undefined reference to `ceil'
gcc -lm test_ceil.c ?
you have to link libm.a to you program explicitely.
On Tue, Feb 03, 2004 at 09:07:35PM +1100, Jim Watson wrote:
> i would appreciate some help to see if this test program is valid before i
> file a bug,
> jim@sun:~/C$ gcc -o test_ceil test_ceil.c
> /tmp/ccwfWhXU.o(.text+0x1c): In function
> : undefined reference to eil'
> collect2: ld returned 1 exit status
> jim@sun:~/C$ cat test_ceil.c
> int main(void)
> double cvalue;
> cvalue = ceil((double)1);
> jim@sun:~/C$ gcc --version
> gcc (GCC) 3.3.3 20040125 (prerelease) (Debian)
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact email@example.com
++ Our capacity for understanding is inversely proportional to
how much we think we know. The more I know, the more I know
I don't know...
++ Please avoid sending me Word or PowerPoint attachments.