TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:10849] compiling c code



Rodney Ray wrote:
> 
> I wrote some code in c but gcc is complaining that there is no function
> sqrt or pow in the math.h. I looked at math.h but did find what I was
> looking for is there a different name (function) or header that will
> compute a power or square root?

when compiling, use the 'cc -o outfile file.c' -lm compiler options to
include the math libraries.

That's assuming that this is a linker error... if it's a compiler error,
you have some other problem.


--
-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Ryan Hankins 
University Of Minnesota, Duluth
-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^