Open m3fist0 opened 3 years ago
On windows you need to link against Advapi32. So the rockspec needs a bit of a modification.
Use Luarocks unpack luasql-mysql
Then edit the luasql-mysql-2.6.0-1.rockspec file. Add advapi32 as shown below:
build = {
type = "builtin",
modules = {
["luasql.mysql"] = {
sources = { "src/luasql.c", "src/ls_mysql.c" },
libraries = { "mysqlclient", "Advapi32" },
incdirs = { "$(MYSQL_INCDIR)" },
libdirs = { "$(MYSQL_LIBDIR)" }
}
}
Then run
luarocks install luarocks luasql-mysql-2.6.0-1.rockspec
Thanks @mavriq-dev , i got it to build with that. But actually running require("luasql.mysql")
I get the error
error loading module 'luasql.mysql' from file 'C:\lua\luasql\mysql.dll':
The specified module could not be found.
which I assume is related to a mysql library it can't find? I tried placing mysqlclient.lib
next to it, and my lua.exe, neither helped
im trying to compile luasql mysql via luarocks from windows but output looks like this, i download lasted mysql server version . what does he want?