Re: Problem compiling with gcc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Cahn writes:

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.

math.h includes bits/mathcall.h, which defines pow().

Add the -lm flag to your link command.

Attachment: pgpwdPo6gOrdw.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux