[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSQLite3 compile error
- From: Peter Cawley <lua@...>
- Date: Tue, 18 Jun 2013 12:33:49 +0100
On Tue, Jun 18, 2013 at 12:22 PM, Carl Yogehnburg
<carlyogehnburg@yahoo.com> wrote:
> I'm having some troubles compiling LuaSQLITE3(0.9.1) with VS2012(Sqlite
> 3.7.17 and tried both lua 5.1.5 and lua 5.2.2). I'm getting the following
> errors from the compiler and honestly I can't figure out what's wrong.
> ...
> lua_pushstring(L, tblname); /* update_hook database name */
> lua_Number n = (lua_Number)rowid; //
> COMPILER ERROR HERE -LINE 1272
If you're using a Microsoft C/C++ compiler in C mode (which you will
be by default when compiling a .c file), then you're limited to an
ancient subset of C. In particular, variable declarations must appear
before all other statements in a block.