When I try to load the Lua module on OSX, I get the following error.
lua: level1.lua:1: module 'libexpand_luaLib' not found: no field package.preload['libexpand_luaLib'] no file './libexpand_luaLib.lua' no file '/opt/local/share/lua/5.1/libexpand_luaLib.lua' no file '/opt/local/share/lua/5.1/libexpand_luaLib/init.lua' no file '/opt/local/lib/lua/5.1/libexpand_luaLib.lua' no file '/opt/local/lib/lua/5.1/libexpand_luaLib/init.lua' no file './libexpand_luaLib.so' no file '/opt/local/lib/lua/5.1/libexpand_luaLib.so' no file '/opt/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' level1.lua:1: in main chunk [C]: ?
The lua interpreter is trying to load the .so file, not the .dylib file. I got the impression that .dylib is the equivalent of OSX (with slight modifications) .so. Therefore, I expect the Lua interpreter to look for the .dylib file.
Should I try to compile my library in .so on OSX? (If so?) Or do I need to change something related to the lua interpreter?
Nexus source share