Closed dmitrysmagin closed 8 months ago
TODO list:
Sorry for all the extra forced pushes, but I have reworked your patches, and rebased them to the current master.
fprintf (stderr, ""); // temporary bug-workaround. Running getopt_long in wine atleast without stderr being initialized causes a strlen(NULL) exception somehow
Should be debugged some probably. Atleast for me if I run the result binary under wine; it crashes without it. All a bit wierd.
No longer happens with my test-setup
Thanks for the effort. Using sed in configure.ac to fix the flags is quite curious, much cleaner that using a separate script.
Here's a PR for windows-specific modifications. 1) Renamed local sdl.h -> sdlx.h to avoid confusion #include "sdl.h" vs #include
2) Added
sdl-win-fix.sh
script which fixes resulting Makefiles for compiling console application instead of windows one. 3) Smaller header fixes for SDL2And yes, both compiling against old SDL12 and newer SDL2 is working (--with-sdl=sdl12 or --with-sdl=sdl2 configure flags)
./configure --prefix=/mingw CXXFLAGS=-fpermissive
Also, a bit ugly, but I had to add
#undef main
just before main(), because SDL on windows does#define main SDLmain
somewhere inside its headers and it can't be overriden in mingw command line. This #undef does no harm on other platforms, though.