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 iPho
I'm not too familiar with iPhone development, but can you set the LUA_PATH env variable before executing your application?
For example, in Linux, I could write a script that executes your binary like so:
export LUA_PATH="foo"
/path/to/executable
Windows has similar functionality with batch files.
If you really need to change it in code, I don't know how to do that short of using luaL_loadbuffer and lua_pcall to execute a "package.path = blah" command.