Posts: 1881 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'"
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'
[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).
--------------------- May the 4th be with you ------------------
Mother Russia dance of the Zar, don't you know how lucky you are