LuaSQL- Installation Problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LuaSQL- Installation Problem

Sandeep Ghai
Hello Group,
I am Trying to install LuaSql to establish connction with database MySQL.
I downloaded the package and after extracting it ,I did some changes in configuration file. And after all I run 'make' command.
But I got some errors like :

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -I/usr/local/mysql/include -I/usr/local/include    -c -o src/luasql.o src/luasql.c
In file included from src/luasql.c:15:0:
src/luasql.h:24:73: warning: type defaults to ‘int’ in declaration of ‘luaL_reg’
src/luasql.h:24:82: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
src/luasql.c:46:73: warning: type defaults to ‘int’ in declaration of ‘luaL_reg’
src/luasql.c:46:82: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
src/luasql.c:31:12: warning: ‘luasql_tostring’ defined but not used
make: *** [src/luasql.o] Error 1

 Please help me in removing these errors.

--
Sandeep Ghai
blog: http://sandeepghai.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: LuaSQL- Installation Problem

David Manura
On Sat, May 5, 2012 at 12:56 AM, Sandeep Ghai <[hidden email]> wrote:
> src/luasql.h:24:73: warning: type defaults to ‘int’ in declaration of
> ‘luaL_reg’
> src/luasql.h:24:82: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token

I've seen this type of error when moving some modules to Lua 5.2.
luaL_reg is a type defined in Lua 5.0.  It was deprecated in Lua 5.1
in favor of luaL_Reg but retained a compatibility macro
("lauxlib.h:#define luaL_reg luaL_Reg"), but that compatibility macro
was removed in Lua 5.2.  There appear to be 5.2 compatibility patches
a month ago in the latest luasql github sources that perhaps resolve
this [1].

[1] https://github.com/keplerproject/luasql/commits/master

Reply | Threaded
Open this post in threaded view
|

Re: LuaSQL- Installation Problem

Tomás Guisasola-2
  Hi

On Sat, 5 May 2012, David Manura wrote:
> There appear to be 5.2 compatibility patches
> a month ago in the latest luasql github sources that perhaps resolve
> this [1].
>
> [1] https://github.com/keplerproject/luasql/commits/master
  I've tested this new version of MySQL driver with Lua 5.0,
5.1 and 5.2 and it worked like a charm :-)

  Regards,
  Tomás