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.