Sign in to follow this  
mattnenterprise

Lua

Recommended Posts

I am using lua and this simple program won't work it looks like this. #include <stdio.h> extern "C" { #include "lua.h" #include "lstate.h" #include "lauxlib.h" } int main(int argc, char* argv[ ]) { lua_State * l = luaL_newstate(); lua_close(l); return 0; } and I get errors that say [Linker error] undefined reference to `luaL_newstate' [Linker error] undefined reference to `lua_close' I don't know what is wrong

Share this post


Link to post
Share on other sites
Usually in the compiler options you find a panel that let you specify which libs you want your project to be linked to. Since you're using Dev-C++ i suppose that the compiler is gcc and IIRC you need th .a libraries.
Just make sure that your lib files are in one of the lib directories. All this is IDE dependant, so you must check in the documentation how to do that in Dev-C++ (I haven't used it for years)...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this