I'm french, by advance, sorry for my english...
I can make and use on linux a pyd (dll) file with this line
cython -o script.c script.pyx
i586-mingw32msvc-gcc script.c -Wall -I/home/User/.wine/drive_c/Python34/include -shared -o script.pyd /home/User/.wine/drive_c/Python34/libs/libpython34.a
It works very well,
However, I test this line for to create executable Windows on Linux, but it does not work. Why ?
My Line:
cython --embed -o script.c script.pyx
i586-mingw32msvc-gcc -c -I/home/User/.wine/drive_c/Python34/include -L/home/User/.wine/drive_c/Python34/libs script.c -o script.exe
EDIT: wine return, that the file is a bad format executable
EDIT2 : suggestion by Petesh
i586-mingw32msvc-gcc -I/home/User/.wine/drive_c/Python34/include /home/User/.wine/drive_c/Python34/libs/libpython34.a script.c -o script.exe
-c option and libpython34.a added
Result:
undefined reference to `_WinMain@16'
EDIT3 : suggestion by Petesh
i586-mingw32msvc-gcc -municode -I/home/User/.wine/drive_c/Python34/include /home/User/.wine/drive_c/Python34/libs/libpython34.a script.c -o script.exe
-municode option added
Result :
cc1: error: unrecognized command line option "-municode"
EDIT4 :
I replaced 'wmain' in script.c by 'main', the error _WinMain@16 is eliminated, but it remains errors of type
/tmp/ccVWy25J.o:script.c:(.text+0x1084): undefined reference to `__imp__PyObject_Call'
/tmp/ccVWy25J.o:script.c:(.text+0x1186): undefined reference to `__imp__PyTuple_Pack'
/tmp/ccVWy25J.o:script.c:(.text+0x1218): undefined reference to `__imp__PyOS_snprintf'
Thanks by advance,