Доброго времени суток, подскажите пожалуйста возможно ли на ++ запустить App.lua, сколько бы я не пытался постоянно выводит сообщение "...программа не работает"?
pragma comment(lib, "lua54.lib")
extern "C" {
include "lua.h"
include "lauxlib.h"
include "lualib.h"
}
include // надо для _getch()
int main(int argc, char argv[])
{
lua_State L = luaL_newstate();
luaL_openlibs(L);//подключить стандартные библиотеки
lua_newtable(L);
int status = luaL_dofile(L, "App.lua");//загрузить файл
/* Состояние стeка:
[-1]main <--top of the stack
*/
if (status)
{
(void)fprintf(stderr, "file not found\n");
return 1;
}
lua_pcall(L, 0, 0, 0);
lua_close(L);
_getch();
return 0;
Доброго времени суток, подскажите пожалуйста возможно ли на ++ запустить App.lua, сколько бы я не пытался постоянно выводит сообщение "...программа не работает"?
pragma comment(lib, "lua54.lib")
extern "C" {
include "lua.h"
include "lauxlib.h"
include "lualib.h"
}
include // надо для _getch()
int main(int argc, char argv[]) { lua_State L = luaL_newstate(); luaL_openlibs(L);//подключить стандартные библиотеки lua_newtable(L);
}