I suppose you have imported math.h with #include <math.h>
So the only other reason I can see is a missing linking information. You must link your code with the -lm
option.
If you're simply trying to compile one file with gcc, just add -lm
to your command line, otherwise, give some informations about your building process.