I'm having issues trying to get cython working with the gcc compiler. I want to use the gcc compiler because I've heard it's harder to get your code from the executable using pyinstaller.
I'm on 64-bit Windows 10.
I have an application that is written in python 3.10.4. It is a command line application that goes against AWS, so there's no Windows calls in it.
I can produce the executable using pyinstaller and it works.
However, when I use the cython command to produce the .c module with a command like this:
cython -3 -o name.c name.py
That seems to work just fine or at least it doesn't generate errors.
Then I tried to create the executable and I've run into all sorts of problems that many others have run into on the internet, too.
I compile it with this command:
gcc -I (path)\Python310\include -L (path)\Python310\libs -lpython310 name.c -o name.exe
and I get this:name.c:220:41: warning: division by zero [-Wdiv-by-zero]220 | enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };| ^name.c:220:12: error: enumerator value for '__pyx_check_sizeof_voidp' is not an integer constant220 | enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };| ^~~~~~~~~~~~~~~~~~~~~~~~
I've tried adding the -DMS_WIN64 option to the gcc command, but then it sends a bunch of errors regarding __imp_Py* and it complains about undefined reference to `WinMain'
I have no clue how to fix this. Can someone help me?
I'm using gcc version 12.1.0