The function pow()
is defined in the math library. Your compiler by default is not linking your program with that library as a result of which the linker is unable the resolve the call to pow()
.
To fix this you need to add -lm
at the end of your compile/link line which links the math lib to your program.