Closed david-grem-armstrong closed 1 year ago
Tolua doesn't have a cmakelists(but xlua have), you can go to luaconfig.h and add #define LUA_USE_DLOPEN
and #define LUA_USE_MACOSX
recomplie tolua. after replacement, restart unity.
after a bit of hoop jumping, I got this to work with the above suggestion. Thanks!
Hey @david-grem-armstrong can you please give a little bit more information, it would mean a lot to me.
Where did you find the luaconfig.h? How did you rebuild it?
Or any other useful links would be helpfull.
I was able to get the source code of the Tolua plugin and build the dylib in an xCode project with the modifications recommended above.
Environment(环境)
What are the steps to reproduce this issue?(重现步骤?)
package.cpath = package.cpath .. '' //this ends with "?.dylib" is that correct?
local dbg = require('emmy_core')
dbg.tcpListen('localhost', 3001)
dbg.waitIDE()
What happens?(出现什么问题?)
An exception is thrown: error loading module 'emmy_core' from file '': dynamic libraries not enabled; check your Lua installation
Based on a translation of this post https://www.jianshu.com/p/571422aeb5b0 It seems that I need to "recompile the module where the lua c code is located to include LUA_USE_MACOSX and add -DLUA_USE_DLOPEN to the cmake file". But I don't understand where that is.
What were you expecting to happen?(期望?)
I should be able to reasonably easily add a bit of lua code to have EmmyLua/Rider add breakpoints into lua code.
Any logs, error output, etc?(有没有什么log, error输出?)
See errors above.
Any other comments?(其它说明)
Thank you for your assistance.