4
I’m trying to compile a simple script that contains:
require 'classlib'
human = class()
function human:__init(name)
self.name = name
end
gabriel = human("Gabriel")
print(gabriel.name)
With srlua, but after compiling, when I try to execute, always gives the error:
1: Could not load package 'classlib' from path ';;C: Program Files Lua 5.1 lua ?. luac
Running the script by the Lua interpreter works normally.
Note: all files are in the same folder(srlua, test.lua, classlib.lua)
Package.path path :
;.\?.lua;G:\PROGRAMACAO\srlua\lua\?.lua;G:\PROGRAMACAO\srlua\lua\?\init.lua;G:\PROGRAMACAO\srlua\?.lua;G:\PROGRAMACAO\srlua\?\init.lua;C:\Program Files\Lua\5.1\lua\?.luac
I downloaded here: http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#srlua
– Gabriel Sales
It was 5.1. I think I got it. I’ll see, and create an answer.
– Gabriel Sales
My mistake, still no solution :\
– Gabriel Sales
your Windows is x64 or x86?
– Guilherme Nascimento
The message you show doesn’t come from Lua.
– lhf
X86. @lhf, you know what can be done?
– Gabriel Sales
Seems to me a path error. Print
package.path
before callingrequire
.– lhf
I edited the question. Hello.
– Gabriel Sales