I made a python script that I wanted to compile to an executable. I used cython first, to create a .c file and then I wanted to compile that to an executable with g++. This however causes an error stating that something in structmember.h (which is a header file that comes with python) is apparently wrong.
I have tried to find other people with the same problem, but I couldn't.
I used this to compile:
g++ Training_set.c -o Training_set.exe 
The error i got was:
Training_set.c:17362:26: fatal error: structmember.h: No such file or directory
compilation terminated.
structmember.h:21:5 error: 'Py_ssize_t" does not name a type
structmember.h:67:11 error: expected constructor, destructor or type conversion before '(' token
structmember.h:68:17 error: expected constructor, destructor or type conversion before 'Pymember_SetOne'
So i managed to fix my problem, somehow if I put all header files in a subdirectory and provide the path to them with -I it does work.
How to fix error from structmember.h when compiling with g++