Problem compiling with gcc.

Robert Cahn robertscahn at gmail.com
Sat Aug 27 15:45:17 UTC 2005


I'm using gcc to write a small cgi-bin program. The program is
calculate.cand it was compiled using a script

gcc -c calculate.c
gcc calculate.o -o calculate.cgi -L./ -lcgic
chmod 777 calculate.cgi

All was well until I needed to use the pow function. I used 
#include <math.h>
as in the past but when I link I get

calculate.o(.text+0x14bf): In function `cgiMain':
calculate.c: undefined reference to `pow'

when I look at math.h there is no reference to pow. Can anyone help or 
suggest another forum where I can ask this question?

Thanks in advance,
/Bob Cahn
Gipsy Trail Club
Carmel, NY 10512
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050827/423997b9/attachment-0001.htm>


More information about the fedora-list mailing list