Code Monkey home page Code Monkey logo

let-us-build-a-lua-interpreter's Introduction

简介

本项目为《Lua解释器构建:从虚拟机到编译器》的随书源码。前5章的代码,均在windows平台和linux平台下通过测试。第6章的工程,为使用本书构建的Lua解释器开发的俄罗斯方块小游戏,只支持在windows系统下编译与运行。欢迎大家加群讨论QQ:185017593。

书籍已经正式上市,可以点击官方正版链接购买,感谢支持。

image

编译环境

windows系统:所有用例均在Visual Studio 2017上通过编译和运行。
linux系统:在ubuntu18.04和centos7上,使用gcc 6.5.0通过编译,并运行。第6章的工程只能在windows平台下编译与运行。

工程构建与编译

随书源码使用cmake来构建工程,构建编译流程如下所示:

windows环境的构建流程

  • 下载:通过git clone命令,clone仓库:git clone https://github.com/Manistein/let-us-build-a-lua-interpreter.git 或 直接点击这里进行下载。
  • 使用cmake工具,构建Visual Studio工程。比如要对C02/dummylua-2-1构建工程,那么需要创建目录C02/dummylua-2-1/build,并将工程构建在这个目录下。
  • 进入build目录,打开Visual Studio工程,编译并运行。
  • 第6章的工程只能在windows系统下进行构建,首先要先后在C06/tetris/3rd/d2d/build、C06/tetris/dummylua/build和C06/tetris/game/build目录下,分别构建d2d、dummylua和game工程。然后先编译3rd库,再编译dummylua库,最后编译和运行game库。

linux环境下的构建流程

Star History

Star History Chart

let-us-build-a-lua-interpreter's People

Contributors

manistein avatar chencara avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.