C Program error : undefined reference to pow
by williambrown615 from LinuxQuestions.org on (#5MG9B)
I typed a C program from the Internet that calculates Compound Interest.
One of the lines in the program reads CIFuture = PAmount*(pow((1+ROI/100), Time_Period));
When I run the program it gives the error: undefined reference to pow.
My gcc version is 7.31 20180712 (RED HAT 7.31-6.
I also included <stdio.h> and <math.h> in the program.
Why is pow undefined?
One of the lines in the program reads CIFuture = PAmount*(pow((1+ROI/100), Time_Period));
When I run the program it gives the error: undefined reference to pow.
My gcc version is 7.31 20180712 (RED HAT 7.31-6.
I also included <stdio.h> and <math.h> in the program.
Why is pow undefined?