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

Compile error on macOS #67

Closed codyloyd closed 6 years ago

codyloyd commented 7 years ago

I'm trying to install this on macOS and I'm getting a compilation error... and I don't know enough about C to debug myself. I have tried installing from luarocks, installing the dev version off of git and with cmake and all 3 methods result in the same error:

/Users/user/lua-sdl/luasdl2/src/window.c:950:10: error: assigning to 'int' from incompatible type 'void'
        if ((ut = lua_getuservalue(L, 1)) == LUA_TUSERDATA) {
                ^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/SDL.dir/src/window.c.o] Error 1
make[1]: *** [CMakeFiles/SDL.dir/all] Error 2
make: *** [all] Error 2
renatosc commented 6 years ago

How did you solve that issue?

codyloyd commented 6 years ago

I didn’t. I moved on.

renatosc commented 6 years ago

Thanks for the reply. I solved here. My luarocks was using lua 5.2. When I changed it to use Lua5.3 it installed fine.