Problem compiling with gcc.
Emily Brantley
koneko.em at gmail.com
Sat Aug 27 15:49:45 UTC 2005
Robert Cahn wrote:
> I'm using gcc to write a small cgi-bin program. The program is
> calculate.c and 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
>
compile with -lm
em.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: koneko.em.vcf
Type: text/x-vcard
Size: 203 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050827/26da7f1d/attachment-0002.vcf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050827/26da7f1d/attachment-0002.bin
More information about the users
mailing list