chrisnlynch
04-02-2002, 02:52 PM
I am writing a small program to calculate the area under a curve. I get the following error each time I try to compile:
[chris@localhost Programs]$ gcc areaundercurve.c
/tmp/ccAPP8Ks.o: In function `f':
/tmp/ccAPP8Ks.o(.text+0x15e): undefined reference to `pow'
/tmp/ccAPP8Ks.o(.text+0x173): undefined reference to `sqrt'
collect2: ld returned 1 exit status
[chris@localhost Programs]$
I have include <math.h> so why am I getting these errors?
Thanks,
Chris
[chris@localhost Programs]$ gcc areaundercurve.c
/tmp/ccAPP8Ks.o: In function `f':
/tmp/ccAPP8Ks.o(.text+0x15e): undefined reference to `pow'
/tmp/ccAPP8Ks.o(.text+0x173): undefined reference to `sqrt'
collect2: ld returned 1 exit status
[chris@localhost Programs]$
I have include <math.h> so why am I getting these errors?
Thanks,
Chris