I have some function module written in Objective-c, could i wrap the objective-C by C++, then integrate C/C++ code with Lua using toLua++, then using the lua code in Corona? Could i do that? It seems impossible…
I have some function module written in Objective-c, could i wrap the objective-C by
Share
you could make a shared library, then just require it into your code.
e.g. create mylibrary.so
then in lua
lua will look for it in your LUA_PATH.
There are a few things I’m not sure of in corona – if it will load a shared library and you can use toLUa++. It will work fine in normal lua. You might have problems with bindings in the shared library to Cocoa – not sure, not something I’ve tried. I’ve built a .dll in windows and it worked fine – again not in corona.
Here’s how to build a shared library
It seems like corona will do it – have a look here
this could be the stopper though – no shared libraries on iOS
hth