That worked thanks :-)

I've read through the gcc man page and didn't see the -lm option.  In my 
source as I understand it #include <math.h> should have done it.  Out of 
curiosity is there a way to compile without specifying -lm?

Just wondering why -lm is required for standard math functions.

Thanks again!

Frank


Frank Carreiro <[EMAIL PROTECTED]> writes:

[snip]

>> 
>> ---
>> 
>> 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