写c++代码并编译
1报错找不到include 的python.h文件
找到python.h所在的目录
比如:C:\ProgramData\Anaconda3\include
编译时添加 -IC:\ProgramData\Anaconda3\include
g++找到了python.h
g++ -IC:\ProgramData\Anaconda3\include test.cpp
2报错’::hypot’ has not been declared"error in g++”
在stackoverflow中,找到答案
https://stackoverflow.com/questions/42276984/hypot-has-not-been-declared
修改代码
#include < cmath>
#include <Python.h>
再修改pyconfig.h的line 234