LuaSQL Problems

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

LuaSQL Problems

Morpheous
Hi all.

When i'm trying to compile LuaSQL 2.0.1 on a Linux 2.6 system, I get a
huge number of errors all stemming from
src/ls_mysql.c:19:19: mysql.h: No such file or directory

I'm compiling only for mySQL, nothing else. I have Lua 5.1 Beta
installed, and compat set up properly for LuaSQL. I get the same
problems with Lua 5.0.

Any ideas? I've checked all the download folders and mysql.h isn't
there, and it's not available from any of their site links.

root@sarek [/gameservers/luasql-2.0.1]# lua -version
Lua 5.1 (beta)  Copyright (C) 1994-2005 Lua.org, PUC-Rio
root@sarek [/gameservers/luasql-2.0.1]# gcc --version
gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)


Hope someone knows what the issue is here, it's driving me up several
walls :-o


James Harrison
Reply | Threaded
Open this post in threaded view
|

Re: LuaSQL Problems

Tomas-14
  Hi James,

> When i'm trying to compile LuaSQL 2.0.1 on a Linux 2.6 system, I get a
> huge number of errors all stemming from

  All your problems are here:
> src/ls_mysql.c:19:19: mysql.h: No such file or directory
  You have to indicate where are the header files in order to
let the compiler do its job :-)  LuaSQL distribution does not provide
the MySQL header files nor the libraries.  You have to use a previous
installation (you Linux distribution must have one) or you can download
it from MySQL site and install it.

> I'm compiling only for mySQL, nothing else. I have Lua 5.1 Beta
> installed, and compat set up properly for LuaSQL. I get the same
> problems with Lua 5.0.
  By the way, you don't need Compat-5.1 with Lua 5.1.

  Hope this helps.
  Tomas
Reply | Threaded
Open this post in threaded view
|

Re: LuaSQL Problems

Jens Alfke
In reply to this post by Morpheous

On 12 Jan '06, at 1:30 PM, James Harrison wrote:

When i'm trying to compile LuaSQL 2.0.1 on a Linux 2.6 system, I get a

huge number of errors all stemming from

src/ls_mysql.c:19:19: mysql.h: No such file or directory

...

Any ideas? I've checked all the download folders and mysql.h isn't

there, and it's not available from any of their site links.


That header is part of MySQL itself, not LuaSQL, so it seems like you have to have MySQL (or at least its headers) installed on that machine to be able to build. For example, on my OS X machine it's in /usr/local/mysql/include/. It might well be in a different place on your Linux box. Try using 'locate mysql.h' to find it, then update the include paths in the makefile accordingly.

--Jens