Red Hat Bugzilla – Bug 9170
Compiling fails with math.h
Last modified: 2008-05-01 11:37:54 EDT
I have tried to compile, for example, this simple program:
The compiler tells me this message: "undefined reference to 'sqrt'
The sqrt() function is implemented in libm. Try adding "-lm" to the end of your
command for compiling your program.