main.py:
print('test')
I can build using this command:
python setup.py build_ext --inplace --compiler=msvc
This will create *.pyd files and put them to needed folders in my package.
But my main.py is compiled as main.pyd.
Extension(
'main',
sources=['main.c','main.py'],
include_dirs=[np.get_include()],
)
Tried this:
cl.exe /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\P\Python27-32\include /Tcmain.c /link /OUT:"main.exe" /SUBSYSTEM:WINDOWS /MACHINE:X86 /LIBPATH:C:\P\Python27-32\libs
But it fails:
main.c Creating library main.lib and object main.exp MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup main.exe : fatal error LNK1120: 1 unresolved externals
Is there a way to build it as Windows executable main.exe using Cython?