samyeyo / LuaRT

Open source Windows programming framework for Lua
https://www.luart.org
Other
285 stars 17 forks source link

Broken `require` function with non built-in DLL packages in root modules #215

Closed noobpen closed 1 month ago

noobpen commented 1 month ago

require tries to call packages incorrectly:

\lrt/modules/crpyto/crpyto.dll
noobpen commented 1 month ago

It appears that after i uninstalled LfW, it deleted LUA_PATH, and it didn't return after installing luaRT.

samyeyo commented 1 month ago

require() is not broken. What do you mean by "it tries to all packages incorrectly ?"

noobpen commented 1 month ago

when i was making a script with net and crypto libs, it said the libs didn't exist. altough they were in my luaRT root.

noobpen commented 1 month ago

luart.exe doesn't find the dlls for these libs, while it gets the right path, it is incorrectly calling it.

noobpen commented 1 month ago

I did how the docs showed it:

local net = require "net"
local crypto = require "crpyto"
local ui = require "ui"

local test = Object{} -- OOP Test
print(test)
noobpen commented 1 month ago

It errors at line 2, saying there is no crypto package.

noobpen commented 1 month ago

commenting the second line fixes it.

samyeyo commented 1 month ago

Do you have the environment variable LUA_PATH defined ? If so, try to suppress it, it should remove this issue

noobpen commented 1 month ago

No LUA_PATH!

noobpen commented 1 month ago

Appears to have fixed itself.