vs2005 测试 lua环境

(1)添加文件核路径

(2)库文件路径

(3)main.cpp

#include <stdio.h>
#include <string.h>

extern "C"{
    #include <lua.h>
    #include <lauxlib.h>
    #include <lualib.h>
}

#pragma comment(lib, "lua51.lib")
#pragma comment(lib, "lua5.1.lib")

int main(int argc, _TCHAR* argv[])
{
    char buff[256];
    int error;

lua_State *L = lua_open();
    luaL_openlibs(L);

//lua_State *L = lua_open();                /* opens Lua */
    //luaopen_base(L);                        /* opens the basic library */
    //luaopen_table(L);                        /* opens the table library */
    //luaopen_io(L);                            /* opens the I/O library */
    //luaopen_string(L);                        /* opens the string lib. */
    //luaopen_math(L);                        /* opens the math lib. */

while (fgets(buff, sizeof(buff), stdin) != NULL) {
        error = luaL_loadbuffer(L, buff, strlen(buff), "line") || lua_pcall(L, 0, 0, 0);
        if (error) {
            fprintf(stderr, "%s", lua_tostring(L, -1));
            lua_pop(L, 1);                    /* pop error message from the stack */
        }
    }
    lua_close(L);
    return 0;
}

vs2005 测试 lua环境

时间: 2025-01-02 01:16:20

vs2005 测试 lua环境的相关文章

Nginx+lua环境搭建

其实有点类似WampServer一站式安装包 wget http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz tar -zxvf ngx_openresty-1.7.10.1.tar.gz cd ngx_openresty-1.7.10.1 ./configure make && make install configure之前需要安装的相关组件 yum -y install pcre-devel yum -y instal

【Lua学习笔记之:Lua环境搭建 Windows 不用 visual studio】

Lua 环境搭建 Windows 不用 visual studio 系统环境:Win7 64bit 联系方式:[email protected] 前言: 最近需要学习Unity3d游戏中的热更新技术,选择ULua方案,因此准备学习一些Lua的基础知识.之前在Ubuntu上曾经写过Lua版本的"HelloWorld", 但那时的环境搭建只需要下载源码,然后 make & make install 就可以了,但一到Windows下就完全不会做了.经过网络查找对比,得到目前自认为较好

nginx部署lua环境

系统环境 # uname -r 3.10.0-229.el7.x86_64 # cat /etc/redhat-release CentOS Linux release 7.1.1503(Core) 所需模块 pcre       ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ luajit         http://luajit.org/download.html ngx_devel_kit  https://github.co

centos下安装lua环境

lua的官方网址: http://www.lua.org/start.html 在lua官网中有介绍linux下lua环境的安装方法如下: 如果遇到问题,看下载文件中的readme文件: README文件内容如下: 用浏览器打开readme.html文件,你会看到很详细的解决办法 以上应该可以解决你遇到的所有问题了,下面看看你是否安装成功,敲入lua命令,进入lua的shell中执行: 如果用文件执行lua脚本,可以这样: 好啦,可以开始学习lua之旅了--

测试DG环境

环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 RedHat Enterprise5.5.Oracle 11g 11.2.0.1 1.测试过程简记 [补充]:修改scott密码 SQL>conn /as sysdba SQL>alter user scott identified by tiger; SQL>connscott/scott SQL>select* from tab;

mac下lua环境搭建笔记

下载lua源码包,进入到根目录下 1.执行make macosx 2.然后再sudo make install即可 mac下lua环境搭建笔记,布布扣,bubuko.com

lua环境搭建 + 常见错误解决 windows + linux双版

lua在linux和windows系统下的安装/配置方法 linux系统: 1)去Lua的官网(http://www.lua.org/ftp/)下载最新发布包,比如lua-5.2.3.tar.gz 2)使用命令tar -xzvf  lua-5.2.3.tar.gz  解压 3)使用命令cd lua-5.2.3 进入lua目录 4)使用命令make linux 此时如出现问题,解决方法如下: 问题:error: <readline/history.h>: No such file or dire

测试项目环境配置

1.建立jiwuyf数据库,加入esfpicture1-100个分表,加入esfidfactory主键生成器表 2.jboss下的mysql-ds.xml中加入数据源配置 <local-tx-datasource> <jndi-name>jiwuyf_slaves_db</jndi-name> <connection-url>jdbc:mysql://192.168.1.253:3306/jiwuyf?useUnicode=true&characte

建立开发板文件,测试编译环境

U-Boot没有支持S3C2440,移植仍是U-Boot支持的SBC2410的文件作为蓝本进行移植.所以移植要做的就是针对S3C2440和S3C2410的不同,以及SBC2410和mini2440开发板的外设不同作相应的修改,并增加新的功能. 6.1 建立开发板文件,测试编译环境 6.1.1 修改顶层Makefile 目的:定义交叉编译工具链和开发板配置选项. CROSS_COMPILE = arm-linux- #set default to nothing for native builds