Reputation: 21
I'm part of a project and trying to make sure that our Lua code can interact with a given MySQL-database which I only have remote access to.
This causes problems when trying to install LuaSQL (through luarocks), giving the following error message:
"Error: Could not find expected file mysql.h, or mysql.h for MYSQL -- you may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command. Example: luarocks install luasql-mysql MYSQL_DIR=/usr/local"
I tried attaching the hostname, "MYSQL_DIR"="MySQLHostName" without any success.
Worth noting is the absence of anything MySQL-related on my local system. Do I need to install something of that kind? I am obviously not interested in a local server.
Edit: After recommendation I installed MySQL locally, and tried to proceed. I then got one step further, but faced problems with the command line not interpreting 'cl'. Running CMD as admin solved that.
Current state: Still missing files for the installation, despite doing the local installation of MySQL. No longer missing "mysql.h" but rather "string.h" and "winsock32.h" which I have no clue what they are.
Upvotes: 1
Views: 1493
Reputation: 80647
You need the MySQL libraries to build LuaSQL. You can get them by either installing MySQL Community Server for Windows, or; alternatively, downloading the ZIP packages, extracting it and browsing to the include/
directory in the package.
The include/
directory contains all inkers and headers etc. sources for MySQL. It is this directory's path that is to be passed for MYSQL_INCDIR
argument.
Upvotes: 1