I'm having trouble getting Lua 5.2.0 to work in Xcode 4. I built it using make linked in liblua.a, added the header path, and included it with Extern "C". I get no linker Errors. However when I run this code:
#include <iostream>
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
int main (int argc, char *argv[])
{
lua_State *ls = lua_newstate(0, 0);
lua_close(ls);
return 0;
}
I get Thread 1: EXC_BAD_ACCESS (code 1, address=0x0) on line 11. Which I assume is telling me that I am in fact trying to make a call to something that does not exist. Any help would be greatly appreciated!
Thanks, Marc