Tangent128 / luasdl2

A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
ISC License
385 stars 74 forks source link

Fixed broken Windows platform overrides #48

Closed Jcw87 closed 8 years ago

Tangent128 commented 8 years ago

Have you had success in installing on Windows with Luarocks with this change, or do you have more to do?

I'm willing to cut a new release if it builds on Windows.

Jcw87 commented 8 years ago

Well, I just used luarocks for the first time yesterday, so I'm not sure how 'normal' my situation is, but here we go. After adding the relevant paths to config-5.1.lua, I got some errors while compiling it with Visual Studio 2005 (I didn't pick it, luarocks picked it automatically. I have 2013 and 2015 as well). Visual Studio 2005 uses a really old C standard, and requires that all local variable declarations occur at the beginning of the scope, before any non-declarative statements. After swapping a few lines around, it compiled just fine. I have yet to actually run it though. I'll get to that eventually.

I will submit a pull request for Visual Studio 2005 compatibility soon.