I am embedding Lua in a C++ application, and I am using luaL_dofile to load a script
However, I c开发者_StackOverflow社区annot seem to find documentation on the functions to use to:
- Compile a script (and save byte stream to a specified folder)
- Save a script to a specified folder
last but not the least, when I use luaL_dofile to load a script into the Lua engine, if the loaded script has a line that loads a module for example:
require 'strict'
which directory would the script.lua (or its compiled version) be loaded from?
Look up luaL_loadfile and lua_dump. See also test/luac.lua.
For the question about where Lua looks for modules require'd: It depends on package.path and package.cpath variables, which can be influenced by the environment variables LUA_PATH and LUA_CPATH.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论