I am using pow
function in C and included the math.h
library too
The following is the error that I am getting :
/usr/bin/ld: /tmp/ccUkOL31.o: in function `main': a1B.c:(.text+0xf3): undefined reference to 'pow' collect2: error: ld returned 1 exit status
Although I read on StackOverflow that linking is required. But that's weird. Is there any way to avoid that extra step when we are compiling with gcc
. g++
seems to be doing it automatically.