You may need to link to the math library, e.g., by using the -lm option.