Lua problem

Started by
2 comments, last by mattnenterprise 15 years, 7 months ago
Iam just trying to create a simple Lua program. Here it is #include <stdio.h> extern "C" { #include <lua.h> } int main(int argc, char* argv[ ]) { lua_State* luaVM = lua_newstate(NULL); if (NULL == luaVM) { printf("Error Initializing lua\n"); return -1; } lua_close(luaVM); return 0; } but it is saying undefined reference to lue_newstate and it says 110 too few arguments to function `lua_State* lua_newstate(void*(*)(void*, void*, size_t, size_t), void*)'
Advertisement
sorry its lua_newstate
lua_newstate requires you to specify a memory allocator. You'll almost always want to use luaL_newstate, which supplies the allocator for you.
It still didn't fix it

This topic is closed to new replies.

Advertisement