Problem Using LuaRocks
Problem Using LuaRocks
Hello everyone. I am trying to use LuaRocks. I am using lua5.1. I just click the install.bat after downloading the win file. When I run luarocks in cmd, it says "The system cannot find specified path." I already added the path in the Enviroment Variables where you can find luarocks.bat. What do you think is wrong? I need your help.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Problem Using LuaRocks
Since debugging this kind of errors is hard, could you please post an screenshot?
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Problem Using LuaRocks
DO you think it has something to do with the config.-5.1.lua? Note that it initially says config.-5.3.lua. I just change the name.
Re: Problem Using LuaRocks
This is what is inside config-5.1.lua
rocks_trees = {
{ name = [[user]],
root = home..[[C:\Program Files (x86)\LuaRocks]],
},
{ name = [[system]],
root = [[C:\gcc-lua-install\lua\lua-5.1]],
},
}
variables = {
MSVCRT = 'MSVCRT',
LUALIB = 'lua51.lib'
}
verbose = false -- set to 'true' to enable verbose output
rocks_trees = {
{ name = [[user]],
root = home..[[C:\Program Files (x86)\LuaRocks]],
},
{ name = [[system]],
root = [[C:\gcc-lua-install\lua\lua-5.1]],
},
}
variables = {
MSVCRT = 'MSVCRT',
LUALIB = 'lua51.lib'
}
verbose = false -- set to 'true' to enable verbose output
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Problem Using LuaRocks
Yeah, you'll probably need to build LuaRocks again, it has been built against Lua 5.3 and you try to run it with a different version (5.1) so it may not run at all.
In another note, luarocks (C:\ProgramFiles x86\LuaRocks) and lua5.1 (C:\gcc-lua-install\lua\lua-5.1 I guess?) need to be in your PATH environment variable.
Also I have never configured luarocks myself but I think it expects to find a few environment variables like LUAINC, LUALIB and whatnot. It should have a tutorial to manually install somewhere though
PS: If you built with MinGW the dll generated for LuaJIT may not be compatible with MSVC built LuaJIT dll (such as the one in LÖVE), I may be wrong but I heard about this a couple of times so I always build with the Community Version of Visual Studio 2013 which is free. Also the dll should have the same name as LÖVE's (lua51.dll) so if you used a different name (lua-5.1.dll, lua-51.dll, lua5.1.dll) it won't find it when you use the dll with LÖVE... yeah this is not easy, so if you did all that then you may be good.
In another note, luarocks (C:\ProgramFiles x86\LuaRocks) and lua5.1 (C:\gcc-lua-install\lua\lua-5.1 I guess?) need to be in your PATH environment variable.
Also I have never configured luarocks myself but I think it expects to find a few environment variables like LUAINC, LUALIB and whatnot. It should have a tutorial to manually install somewhere though
PS: If you built with MinGW the dll generated for LuaJIT may not be compatible with MSVC built LuaJIT dll (such as the one in LÖVE), I may be wrong but I heard about this a couple of times so I always build with the Community Version of Visual Studio 2013 which is free. Also the dll should have the same name as LÖVE's (lua51.dll) so if you used a different name (lua-5.1.dll, lua-51.dll, lua5.1.dll) it won't find it when you use the dll with LÖVE... yeah this is not easy, so if you did all that then you may be good.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Problem Using LuaRocks
Thanks. I just forgot to add all paths. It is working now but I have another error installing luasql:
LNK1181:cannot open input file 'mysqlclient.lib'
LNK1181:cannot open input file 'mysqlclient.lib'
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Problem Using LuaRocks
I suggest you move everything in the "C:\Program Files\MySQL\MySQL Connector\include" and "C:\Program Files\MySQL\MySQL Connector\lib" to a path with no spaces like "C:\MySQL\include" and "C:\MySQL\lib" because the problem may be that the quotes are discarded and your path contains spaces so the linker can't handle those paths... For more information on the issue check support from Microsoft
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Problem Using LuaRocks
Hello thanks for the reply. I finally installed (I think) luasql-mysql but I have some trouble loading it. When I run in CMD the following codes:
local mysql = require("luasql-mysql")
the console says module not found. It seems the only thing that installation gave is mysql.dll. I cannot find any luasql.lua or luasql.mysql LUA file in my computer.
Below are the images
Hope someone can help me. It seems I am near completing it.
local mysql = require("luasql-mysql")
the console says module not found. It seems the only thing that installation gave is mysql.dll. I cannot find any luasql.lua or luasql.mysql LUA file in my computer.
Below are the images
Hope someone can help me. It seems I am near completing it.
Re: Problem Using LuaRocks
'luasql-mysql' is the rock name. The dll names are not necessarily identical.
Try requiring require("mysql") instead to see if it finds the dll.
When I had similar problems, I moved the dlls to one of the folders listed in the error message and it worked.
Try requiring require("mysql") instead to see if it finds the dll.
When I had similar problems, I moved the dlls to one of the folders listed in the error message and it worked.
Re: Problem Using LuaRocks
Hello. Thanks for the reply. I try putting the dll file but I got the following error:
Who is online
Users browsing this forum: Ahrefs [Bot] and 9 guests