dail8859 / LuaScript

Notepad++ plugin for Lua scripting capabilities

Home Page:https://dail8859.github.io/LuaScript/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing modules

Smurfy98 opened this issue · comments

Hello, today I compiled wxLua for use with this Npp plugin and it didn't work. The error I get is:

error loading module 'wx' from file 'C:\Users\[USER]\AppData\Roaming\Notepad++\plugins\Config\LuaScriptLibs\wx.dll': The module could not be found

I redacted my username and translated the part after the : because that was in my native language.

Do you have any idea how I could proceed with this? Is it just straight up not possible to load .dll files with this plugin? It does find the .dll, when I try to require("wx") without it being in the search path I get a different message. The .dll exports the funtion luaopen_wx and it works when using the Lua I also compiled for myself. So the problem will probably be either compatibility of the library (compiled using Lua 5.3.5 as a reference, just like your plugin) or the plugin itself.

Any help would be appreciated. Cheers.

Hi @Smurfy98

Loading DLLs is possible. I don't use this myself but have had past users request this functionality.

error loading module 'wx' from file 'C:\Users\[USER]\AppData\Roaming\Notepad++\plugins\Config\LuaScriptLibs\wx.dll': The module could not be found

Does this print file paths this is searching for? You can also modify where Lua searches for packages...I think it's package.path you can modify.

Do you have any idea how I could proceed with this? Is it just straight up not possible to load .dll files with this plugin? It does find the .dll, when I try to require("wx") without it being in the search path I get a different message. The .dll exports the funtion luaopen_wx and it works when using the Lua I also compiled for myself. So the problem will probably be either compatibility of the library (compiled using Lua 5.3.5 as a reference, just like your plugin) or the plugin itself.

Since the dll is in that exact path then the DLL might not be compatible. There is an SDK on the releases page here on GitHub. If you compile wx with this lib then that should ensure the ABI matches.

Again I dont use this functionality myself so in theory there could be some issue introduced at some point which broke this.