Lua C-API problem
public c v1 · immutable#include <stdio.h>#include <iostream>#include <string.h>extern "C" {#include "lua.h"#include "lauxlib.h"#include "lualib.h"}using namespace std;static int ct(lua_State *L){ cout << "Hello World!" << endl;return 0;}int main(int argc, char* argv[]){ lua_State *L = luaL_newstate(); L = lua_open(); luaL_openlibs(L); lua_register(L, "ct", ct); luaL_dofile(L, "test.lua"); lua_close(L); return 0;}