blob: 02ca7709df8e71e5c8306f538eaa8bede6558c65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#include "tclass.h"
//Test::Tst_A* Test::Tst_A::last;
//Test::Tst_B* Test::Tst_B::last;
//Test::Tst_C* Test::Tst_C::last;
extern "C" {
int tolua_tclass_open (lua_State*);
}
int main ()
{
Test::Tst_B* b = new Test::Tst_B; // instance used in Lua code
lua_State* L = lua_open();
luaL_openlibs(L);
tolua_tclass_open(L);
luaL_dofile(L,"tclass.lua");
lua_close(L);
delete b;
return 0;
}
|