Frank Carreiro <[EMAIL PROTECTED]> writes:

> Not sure if this is the right list for it but here goes...
> 
> I'm currently learning how to code in C.  I'm using a RedHat 7.1
> workstation which when installed I selected to install everything (I
> don't like messing with dependancies ::grinz::).  I've been including
> stdio.h and the last few weeks everything has been happy.  The last
> couple of days I've been learning about math.h however it's failing
> when 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?

"-lm" (link with the standard math library)

-- 
Trond Eivind Glomsrød
Red Hat, Inc.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to