1
我無法讓Lua 5.2.0在Xcode 4中工作。我使用鏈接在liblua.a中的make
構建它,添加了標題路徑,並將它與Extern "C"
一起包含在內。我沒有收到鏈接錯誤。然而,當我運行此代碼:使用Xcode嵌入Lua
#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;
}
我得到Thread 1: EXC_BAD_ACCESS (code 1, address=0x0)
上線11我以爲是告訴我,我事實上是在試圖做出一些不存在的電話。任何幫助將不勝感激!
感謝, 馬克
我正式覺得自己像個白癡。謝謝! – Sparky 2012-04-28 15:48:18