(Linked to Cython without Console on Windows but this one is for Python 2.7 and mingw, the solutions don't work directly here)
This allows to create a .exe with Cython:
cython test.py --embed
call vcvarsall.bat x64
cl test.c /I C:\Python38\include /link C:\Python38\libs\python38.lib
It works, and then test.exe
starts the program in a terminal console window.
How to compile with cython --embed
it without a console window?
I tried
cl test.c /I C:\Python38\include /link C:\Python38\libs\python38.lib /subsystem:window
but it fails with:
LIBCMT.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)