This is a linker failure. You need to link with the math library, specify -lm
at the end of your compiler command. From man pow:
Link with -lm.
More Related Contents:
- Divide one list into two. C
- expected ‘void (**)(void *, const char *)’ but argument is of type ‘void (*)(void *, const char *)
- What can I use for input conversion instead of scanf?
- Why does reading into a string buffer with scanf work both with and without the ampersand (&)?
- Is bool a native C type?
- Is NULL always zero in C?
- What should I do if two libraries provide a function with the same name generating a conflict?
- gcc, strict-aliasing, and horror stories [closed]
- What exactly is meant by “de-referencing a NULL pointer”?
- How to scanf only integer?
- Matrix multiplication: Small difference in matrix size, large difference in timings
- Meaning of “referencing” and “dereferencing” in C
- How do you get a directory listing in C?
- What is the purpose of a zero length array in a struct? [duplicate]
- Fastest way to multiply an array of int64_t?
- How to work on a sub-matrix in a matrix by pointer?
- When to use static keyword before global variables?
- What are null-terminated strings?
- Can an equality comparison of unrelated pointers evaluate to true?
- What happens if I try to access memory beyond a malloc()’d region?
- Equivalents to MSVC’s _countof in other compilers?
- Warning: array subscript has type char
- how to bind raw socket to specific interface
- Passing an Array by reference in C
- Why does wait() set status to 255 instead of the -1 exit status of the forked process?
- gdb gives strange output when using math.h functions [duplicate]
- How to do an specific action when a certain breakpoint is hit in GDB?
- lvalue required as increment operand
- Parse CSV file in C [closed]
- GCC – no warning about an uninitialized array with -O0