[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: error using require
- From: luo_hei@...
- Date: Fri, 25 Nov 2011 16:30:32 -0500
Im trying to use require on some code embedded in a C++ application and
Im getting an error:
Lua: ../../game/game.lua:9: attempt to call global 'require' (a nil value)
This is the code line in lua:
require "asa.lua"
And the lua vm initialization:
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
luaVM=lua_open();
//init required libs
luaopen_base(luaVM);
luaopen_math(luaVM);
luaopen_table(luaVM);
luaopen_string(luaVM);
Can somebody see what is the problem here? I have Lua 5.1 and Ubuntu 11.10
--
Roger D. Vargas
Using Gentoo Linux 2010
La unica forma de encontrar los limites de lo posible es yendo mas
alla de ellos, hacia lo imposible