I have a trivial program to test for availability of python development files:
#include
int main(){Py_Initialize(); Py_Finalize(); }
<
if with python 3.x installed, maybe this command can work:
g++ hw.cpp `/usr/bin/python3-config --cflags` `/usr/python3-config --ldflags`
By the way, you should check you gcc and python version.
As I know, if gcc version is 5.4 and python version is 3.7, it doesn't work.(python 3.5 is work)
When you run /usr/bin/python3-config --cflags
, in fact, it is the compile option.