• 在Windows环境下构建Lua 入门


    在Windows环境下构建Lua

    一:准备软件

             1.C-compiler(TDM GCC)  http://tdm-gcc.tdragon.net/download

             2.Lua源代码  http://www.lua.org/download.html

             3.用2345好解软件更方便。解压软件7-zip,这里不使用官方版本

       http://portableapps.com/apps/utilities/7-zip_portable

            

    二:安装软件

    1. gcc

     

     

     

     

    安装完成gcc后的目录结构如下

     

    2.安装解压软件 7-Zip (用好压吧,反正这一步就是把lua的目录解压出来)

    3.创建一个cmd文件,如build.cmd,并将以下文本拷贝进去

    @echo off

            :: ========================

            :: file build.cmd

            :: ========================

            setlocal

            :: you may change the following variable's value

            :: to suit the downloaded version

            set lua_version=5.2.2

            set work_dir=%~dp0

            :: Removes trailing backslash

            :: to enhance readability in the following steps

            set work_dir=%work_dir:~0,-1%

            set lua_install_dir=%work_dir%lua

            set compiler_bin_dir=%work_dir% dm-gccin

            set lua_build_dir=%work_dir%lua-%lua_version%

            set path=%compiler_bin_dir%;%path%

            cd /D %lua_build_dir%

            mingw32-make PLAT=mingw

            echo.

            echo **** COMPILATION TERMINATED ****

            echo.

            echo **** BUILDING BINARY DISTRIBUTION ****

            echo.

            :: create a clean "binary" installation

            mkdir %lua_install_dir%

            mkdir %lua_install_dir%doc

            mkdir %lua_install_dir%in

            mkdir %lua_install_dir%include

            copy %lua_build_dir%doc*.* %lua_install_dir%doc*.*

            copy %lua_build_dir%src*.exe %lua_install_dir%in*.*

            copy %lua_build_dir%src*.dll %lua_install_dir%in*.*

            copy %lua_build_dir%srcluaconf.h %lua_install_dir%include*.*

            copy %lua_build_dir%srclua.h %lua_install_dir%include*.*

            copy %lua_build_dir%srclualib.h %lua_install_dir%include*.*

            copy %lua_build_dir%srclauxlib.h %lua_install_dir%include*.*

            copy %lua_build_dir%srclua.hpp %lua_install_dir%include*.*

            echo.

            echo **** BINARY DISTRIBUTION BUILT ****

            echo.

            %lua_install_dir%inlua.exe -e"print [[Hello!]];print[[Simple Lua test successful!!!]]"

            echo.

            pause

     4.双击运行build.cmd,等待完成

    此时安装目录下的文件结构:

     

  • 相关阅读:
    百度搜索API v3版本与soap
    Yii整合ZF2及soap实例
    Getting started writing ZF2 modules
    js写出php中的函数系列
    一些有用的命令
    a标签至于flash之上的时候,IE浏览器无法点击连接的问题
    js问题集锦
    php常用函数集锦[备份用的]
    用过的一些js函数[备份用的]
    ELK
  • 原文地址:https://www.cnblogs.com/imzhstar/p/3608050.html
Copyright © 2020-2023  润新知