After having some trouble trying to embed Python into my program using #include <Python.h>
, I finally got it to find all the correct libraries, but I have another error. When I try to compile with #include <Python.h>
it redirects me to cmath in my code::blocks directory, and puts an error marker by the line that says using ::hypot;
and says: error: '::hypot' has not been declared
. I have no idea why this is an error, especially because this came with my code::blocks installation, and came up, I assume, because Python tried to include it. I am on Windows, and using the newest version of Python (3.4.2)
Try adding
#include <cmath>
before including Python when compiling.
Your error is a result of hypot
being renamed to _hypot
in your pyconfig header file. cmath is expecting to see hypot
and not _hypot
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With