• Moderator
    Kronos
    Posts: 2236 from 2003/2/24
    O.k. here is what I've tried sofar:

    - took the source for os.module and replaced all "os" with "test"
    - added "t_" in front of all function-names

    -> compiled without issues

    - copied to "ibs:lua/" (also tried" mossys.libs/lua")

    1st line of script: " require 'test'"

    ->
    Code:
    lua: Work:module_test/test.lua:1: module 'test' not found:
    no field package.preload['test']
    no file '/usr/local/share/lua/5.3/test.lua'
    no file '/usr/local/share/lua/5.3/test/init.lua'
    no file '/usr/local/lib/lua/5.3/test.lua'
    no file '/usr/local/lib/lua/5.3/test/init.lua'
    no file './test.lua'
    no file './test/init.lua'
    no file '/usr/local/lib/lua/5.3/test.so'
    no file '/usr/local/lib/lua/5.3/loadall.so'
    no file './test.so'
    stack traceback:
    [C]: in function 'require'
    Work:module_test/test.lua:1: in main chunk
    [C]: in ?


    Seems that LUA only knows a fixed number of modules listed in "package".

    LUA docs itself want me to either do a .dll (would that work???) or compile my own LUA with my module linked to it (not really an option).

    [ Edited by Kronos 09.11.2019 - 11:15 ]
  • »20.06.19 - 18:46
    Profile