• Advertisement
Sign in to follow this  

Lua problem

This topic is 3412 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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*)'

Share this post


Link to post
Share on other sites
Advertisement
lua_newstate requires you to specify a memory allocator. You'll almost always want to use luaL_newstate, which supplies the allocator for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement