pow() function question

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Oct 20 18:51:23 UTC 2004


On Wed, Oct 20, 2004 at 01:44:15PM -0400, fcsoft-3Emkkp+1Olsmp8TqCH86vg at public.gmane.org wrote:
> What library does one have to link in to enable the pow() function in a C 
> program?

Perhaps libm (libmath for c) will help.  Add -lm to the link step.

Anything that uses #include "math.h" needs -lm as well when linking.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list