On Sat, 25 Mar 2017 19:52:26 -0700 (PDT)
mdelaf...@uc.cl wrote:
> I have the file test.pyx:
>
> print("Test")
>
> I want to compile it to a standalone executable in my Windows machine (W10
> - 64 bits). It seems there are two steps to do this:
>
> First, we create the C file with the --embed option:
> cython --embed -o test.c test.pyx
>
> And then we compile it using GCC:
> gcc test.c -IC:\Python34\include -LC:\Python34\libs -lpython34 -o test.exe
>
> But I am getting the following error:
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64
> -w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): In
> function `main':
> C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18:
> undefined reference to `WinMain'
> collect2.exe: error: ld returned 1 exit status
>
> I have also looked up for this error and it seems to occur when the .c file
> doesn't have a *main *function. If you look at test.c, there's no *main *function,