Python写C/C++扩展时,编译报错:error: '::hypot' has not been declared
Python写C/C++扩展时,编译报错:error: '::hypot' has not been declared原因解决方法原因在 pyconfig 的 header file中,hypot 被重命名为了 _hypot 。而 cmath 调用了 hypot。解决方法在#include <Python.h>之前#include <math.h>;在编译选项里...
原创
2019-09-26 10:17:46 ·
1518 阅读 ·
1 评论