[vox-tech] math.h advice?
vox-tech@lists.lugod.org
vox-tech@lists.lugod.org
Mon, 8 Jul 2002 21:29:39 -0400
On Mon, Jul 08, 2002 at 06:19:23PM -0700, Alexandra Thorn wrote:
> RedHat 7.2.somethingeruther machine. I'd like to be able to use functions
> like sin, cos, and round, but gcc does not seem to be recognizing them,
> even though I've #included <math.h>.
Alex,
Add "-lm" to your gcc link line... that asks gcc to link in the math
library. "-l" says link in the following library "m" is the name of the
math library.
So "gcc -o run_me infile.c -lm" should produce a run_me...
If not please paste the error messages you see.
Good Luck,
Mike