Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Fri, 2 Apr 2021 13:17:14 +0200 Thomas Huth <th.huth@xxxxxxxxx> wrote:

> What failure do you exactly get?

[  0%] Building C object src/cpu/CMakeFiles/build68k.dir/build68k.c.obj
<command-line>: warning: no previous prototype for 'SDL_main' [-Wmissing-prototypes]
C:/msys64/home/jens/hatari/src/cpu/build68k.c:59:5: note: in expansion of macro 'main'
   59 | int main(int argc, char **argv)
      |     ^~~~
[  1%] Building C object src/cpu/CMakeFiles/build68k.dir/writelog.c.obj
[  1%] Linking C executable build68k.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function `main':
C:/_/M/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
make[2]: *** [src/cpu/CMakeFiles/build68k.dir/build.make:118: src/cpu/build68k.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:533: src/cpu/CMakeFiles/build68k.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

> Hmm, that can't be the solution either. IIRC I once added the whole
> stuff with the "other cflags" to fix compilation problems on Windows...

Sorry, I wasn't sure if SDL2_OTHER_CFLAGS is required on other platforms.

> ... maybe we could simply drop this completely now?

Probably the best solution ... :-)

Jens



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/