I’m trying to set my global LUA_PATH variable directly from C/C++, I’m using Lua from my iPhone applications, so my path tends does change between applications ( each iPhone app has a separate folder in the device ).
I know I could set the LUA_PATH by recompiling lua with a “fixed” path, but that’s quite far from ideal.
( I’m trying to do this in order to be able to use require, from my .lua scripts.
Could anyone help me out here ?
In C++:
I haven’t tested or compiled it. I used: http://lua.org/pil and http://lua.org/manual/5.1