On Thu, 21 Feb 2002 11:17:40 -0700
Frank Carreiro <[EMAIL PROTECTED]> wrote:
<snip...>
> I try and compile.  Getting the following message:
> 
> ---
> 
> In function `main`:
> undefined reference to `pow`
> collect2: ld returned 1 exit status
> 
> ---
> 
> I'm trying to calculate a value (x) raised to the y power.  I suspect 
> there is a library not found by the linker (wild guess).
> 
> Any thoughts on how I can track this down?
> 
> Thx

$ apropos pow
README.machten [perlmachten] (1)  - Perl version 5 on Power MachTen systems
apm                  (1)  - query Advanced Power Management (APM) BIOS
apmd                 (8)  - Advanced Power Management (APM) daemon
exp                  (3)  - exponential, logarithmic and power functions
ldexp                (3)  - multiply floating-point number by integral power of 2
log [exp]            (3)  - exponential, logarithmic and power functions
log10 [exp]          (3)  - exponential, logarithmic and power functions
pow [exp]            (3)  - exponential, logarithmic and power functions
poweroff [halt]      (8)  - stop the system

Then look at the manpage for the pow function

>From the manpage
<snip..>
EXP(3)              Linux Programmer's Manual              EXP(3)

NAME
       exp, log, log10, pow - exponential, logarithmic and power functions

SYNOPSIS
       #include <math.h>
<snip...>

The pow function is in math.h

Regards,
        Jim H

Attachment: msg72484/pgp00000.pgp
Description: PGP signature

Reply via email to