Open Nlcke opened 8 years ago
Windows build scripts have not been tested lately, so you may need some trial and error (if you have to edit the scripts, please send a pull request if the fix looks generally applicable)
You will want the devel- versions of the libraries, with the same verison number for the core and image/ttf/etc libraries. Latest version is probably safe.
If you want to produce 64-bit binaries, I assume you would want Mingw64, but I have not used it lately. Mingw32 would presumably still work, but would produce 32-bit binaries.
Since I spent a better part of an evening trying to compile luasdl for windows, and finally suceeded, I thought I'd share my findings. Perhaps they can be helpful to others.
I managed to compile on Windows 7 with the TDM-GCC-64 5.1.0 for my compiler toolchain (generate "MinGW Makefiles"). I tried generating for "Visual Studio" but could not get that to work. These were the steps:
I tested running various tutorial snippets (including bouncing logo) and so far everything works. If I missed something obvious shame on me. Perhaps someone proficient in cmake (my future self?) can fix the linker statement generation.
I spent a good afternoon doing this too, pretty much the same as pgerhardy but with ran in to a lot of my own issues. If anyone comes across this, just to save them time, here's the compiled 64 bit bins (you'll need the 64 bit Lua interpreter): lua-sdl2.zip (64 BIT)
Which exactly SDL2 libraries (e.g. you need SDL2-devel-2.0.4-mingw.tar.gz, SDL2_image-2.0.1.zip, etc) do I need to download to make with Cmake and then compile with Mingw? Do I need Mingw32 or Mingw64? Which version of Cmake do I need?