🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: csu.cs.200
Article #255

Re: pow function

#255
From: Corby S. Hudnall
Date: Thu, 04 Dec 1997 00:00
28 lines
908 bytes
Be sure to link with the math library...

g++ file_uses_pow.cc -o program -lm

The '-lm' exlicitly links to the math library and should clear up your
problem.

cheers
Corby

jeff sullins wrote:

> Can anyone tell me why the math.h function pow is giving me the error:
> Unsatisfied symbol pow(code)
>
> Here is the code segment I am using:
>
> #include<math.h>
>
> double result;
> double x, y;
> x = 2.0;
> y = 3.0;
>
> result = pow(x, y);
>
> This won't work...why not?
Technical Details
Message-ID: <34870DE3.6621DEC1@cs.colostate.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <666mv6$qhp@dupre.cs.colostate.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 127144,360b57960328ecc7
X-Google-Attributes: gid127144,public
From: "Corby S. Hudnall" <hudnall@cs.colostate.edu>
Subject: Re: pow function
Date: 1997/12/04
Message-ID: <34870DE3.6621DEC1@cs.colostate.edu>
X-Deja-AN: 295253639
References: <666mv6$qhp@dupre.cs.colostate.edu>
Organization: Colorado State University
Newsgroups: csu.cs.200