Simple configuration of lua environment

<p>If you use Lua for windows, you can just install it. </p> <p>1. Download lua5.2.2 from the official website and unzip it. </p> <p>2. Create a new vs2010 empty project such as name lua522, and add all header files and source files in lua5.22. First remove the source file luac.c. </p> <p>3. Compile and generate lua522.exe, and add the program generation path, such as xxx\Debug, into the Path system variable. </p> <p>4. Start cmd and type lua522 -v to get lua version information, indicating success. </p> <p>Postscript: If you want to generate the lua522.dll file, add luac.c and remove lua.c, change the general->configuration type in vs to dynamic library. </p> <p>Configure the editing environment Editplus:</p> <p>1. Tools -> Configure User Tools, rename Group 1 to Lua, and click Add Tools. </p> <p>2. Fill in Running Lua in Menu text, and add the path of lua522.exe in the Command line, such as D:\xxx\lua522.exe</p> <p>3. Fill in Argument $(FileName), fill in $(FileDir) in Initial, ok. </p> <p>The following is to configure the highlight syntax of Editplus. </p> <p>4.editplus official website <a title="http://www.editplus.com/others.html" href="http://www.editplus.com/others.html">http https://www.editplus.com/others. html</a>Download the Lua 5.1 stx syntax highlighting file and unzip it. </p> <p>5. In the configuration user tool, File->Setting&syntax add the file type lua, find the lua51.stx path in the syntax file and fill in for example D:\xxx\lua51.stx</p> <p>6. Create a txt file named template.lua arbitrarily, click Add in File->Templates, write the template file path such as D:\xxx\template.lua</p> <p>And Name it Lua in the Menu text item. </p> <p>Now to verify the configuration:</p> <p>Create a new lua file, type the code print(“hello, world”) Click Tools->Lua in User Tool Group, press Ctrl+ 1. Ha ha, the console and hello, world appear.</p> <p>It means success. </p> Create a new lua file, type in the code print(“hello, world”) Click Tools->Lua in User Tool Group, press Ctrl+1, the console and hello,world appear</p> <p>indicates success . </p> Create a new lua file, type in the code print(“hello, world”) Click Tools->Lua in User Tool Group, press Ctrl+1, the console and hello,world appear</p> <p>indicates success . </p>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325415176&siteId=291194637