Jump to content
  • Advertisement
Sign in to follow this  
mattnenterprise

Lua problem

This topic is 3623 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!