[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua-SDL2 rc1 available for testing!
- From: Jeff Pohlmeyer <yetanothergeek@...>
- Date: Sat, 26 Apr 2014 06:04:23 -0500
On Apr 26, 2014 5:38 AM, David Demelier wrote:
> I'm very happy to announce the first release candidate of Lua-SDL2
> Lua-SDL2 is a pure C binding against SDL 2.0.3.
> ...
> It should compile on major platforms which support C and SDL.
Cool!
I checked out the HG repo but got an error compiling on ArchLinux...
./src/haptic.c:79:3: error:
'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 3; ++i) {
^
GCC says:
Note: use option -std=c99 or -std=gnu99 to compile your code.
But I think the more portable fix would be to declare 'i' first:
if (lua_type(L, -1) == LUA_TTABLE) {
int i;
for (i = 0; i < 3; ++i) {
...
}
}
After that change 'make' succeeds.
Nice work, David!
- Jeff