Question 14.3

I'm trying to do some simple trig, and I am #including <math.h>, but I keep getting ``undefined: sin'' compilation errors.


Make sure you're actually linking with the math library. For instance, under Unix, you usually need to use the -lm option, at the end of the command line, when compiling/linking. See also questions 13.25 and 13.26.


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback