"Error:" :: hypot "was not declared" in cmath while trying to insert Python

After some problems trying to embed Python in my program using #include <Python.h> , I finally got it to find all the correct libraries, but I have one more error. When I try to compile using #include <Python.h> , it redirects me to cmath in my code :: blocks directory and places the error marker on the line using ::hypot; and says: error: '::hypot' has not been declared . I have no idea why this is a mistake, especially because it happened with my installation of :: blocks code, and I assumed that Python tried to enable it. I am on Windows and using the latest version of Python (3.4.2)

+2
source share
1 answer

Try to add

 #include <cmath> 

before turning on Python at compilation.

Your error is the result of renaming hypot to _hypot in the _hypot header file. cmath expects to see a hypot , not _hypot .

+10
source

All Articles