[H-GEN] 'pow' wont work for me

Anthony Towns aj at azure.humbug.org.au
Mon Jul 6 02:15:35 EDT 1998


On Mon, Jul 06, 1998 at 03:19:30PM +1000, Luke Grant wrote:
> basicaly i am trying to use the function 'pow' from the <math.h> lib and
> it just wont work.
> i get the error.....
> In function 'main';
> /home/clientcgi/testpow.c : : undefined reference to 'pow'
> make: *** [encode] Error1

gcc -lm -o whatever whatever.c # -lm to "l"ink with "m"ath routines

> #include <stdio.h>
> #include <math.h>
> 
> void main(){
  ^^^^ int.

> double num1,num2,num3;
> 
> num1 = 355436.0;
> num2 = 24453.0;
> 
> num3 = pow(num1, num2);
> 
> printf("%lf\n",num3);
return 0;
> }

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.

      ``It's not a vision, or a fear. It's just a thought.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 434 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/19980706/fd26cb32/attachment.sig>


More information about the General mailing list