On Tue, Jan 02, 2001 at 11:05:50PM +0000, paul wrote:
> hello all,
> i'm trying to compile (gcc filename.c) the following program, but it seems
> math.h isn't being found.
> 
> this is the error:
> /tmp/ccCw1SMR.o: In function `main':
> /tmp/ccCw1SMR.o(.text+0x52): undefined reference to `pow'
> collect2: ld returned 1 exit status

You need to link with the Math library (libm) aswell.

gcc filename.c -o prog -lm

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'

Reply via email to