OSX에서 Lua 모듈을로드 할 때 다음 오류가 발생합니다.OSX dylib Lua 모듈로드 중
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]: ?
lua 인터프리터는 .dylib 파일이 아닌 .so 파일을로드하려고합니다. 나는 .dylib가 .so의 (약간의 변경과 함께) OSX와 동일하다는 인상하에 있었다. 그래서 루아 통역사가 .dylib 파일을 찾을 것으로 기대합니다.
내 라이브러리를 OSX에서 .so로 컴파일해야합니까? (그렇다면 어떻게됩니까?) 아니면 루아 인터프리터와 관련된 내용을 변경해야합니까?