After including the math.h library my compiler returns the error: "undefined symbol sqrt. ld fatal: symbol referencing errors." when trying to use the square root function. Any ideas what to do? Thanks in advance.

TKnight

Printable View

- 11-09-2008TKnightBeginner Question
After including the math.h library my compiler returns the error: "undefined symbol sqrt. ld fatal: symbol referencing errors." when trying to use the square root function. Any ideas what to do? Thanks in advance.

TKnight - 11-09-2008TKnight
Turns out the compiler was limited and using a different one solved the problem.

- 11-09-2008zacs7
Link with the math library, usually "-lm"

- 11-09-2008Elysia