Re: [anjuta-list] Related to "pow" in the C programming language



Hi,

On 21/01/2019 21:29, Ali Ayse via anjuta-list wrote:
I had a problem with "pow" when I was gonna do it today. I tried several times with "#include <stdio.h>" and "#include 
<stdlib.h>" and "#include <math.h>", but failed. It gives an error. This is the error:
undefined reference to `pow'

I think it's because you need to link your program with the mathematic library. You need to add -lm in the linker flags.


Regards,

Sébastien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]