📄 main.cpp
字号:
// SLHELLO.C
//
// Copyright (c) 1997-1999 Symbian Ltd. All rights reserved.
//
/*
* The classic "Hello World" program
*/
#include <stdio.h>
#include <lua/lua.h>
#include <lua/lualib.h>
#include <lua/lauxlib.h>
#include <lua/tolua.h>
IMPORT_C int tolua_shape_open (lua_State* tolua_S);
int main (int argc, char *argv[])
{
argc=0;
argv=NULL;
lua_State *pst;
pst = lua_open();
luaopen_base(pst);
luaopen_table(pst);
luaopen_io(pst);
luaopen_string(pst);
luaopen_math(pst);
luaopen_debug(pst);
tolua_shape_open (pst);
lua_dofile(pst, "z:/shape.lua");
char *p = "print (\"hello from lua\")";
lua_dostring(pst, p);
printf("Hello World\n");
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -