-1
내 코드삽입 루아 런타임 오류 : 기호를 찾을 수 없습니다 _luaL_newstate
inline int DOFILE(string& filename) {
printf("lua_open\n");
/* initialize Lua */
lua_State* L = lua_open();
printf("lua_openlibs\n");
/* load Lua base libraries */
luaL_openlibs(L);
printf("lua_dofile\n");
/* run the script */
int ret = luaL_dofile(L, filename.c_str());
printf("lua_close\n");
/* cleanup Lua */
lua_close(L);
return ret;
}
컴파일 옵션 :
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-llua-5.1"]
또한 그들 모두가
경고보고, '-llualib' '-llua를'시도 내가 실행하면i686-apple-darwin11-llvm-g++-4.2: -llua-5.1: linker input file unused because linking not done
, 그것을보고 :
lua_open
dyld: lazy symbol binding failed: Symbol not found: _luaL_newstate
Referenced from: /Users/gl/workspace/node-lua/build/Release/node_lua.node
Expected in: flat namespace
dyld: Symbol not found: _luaL_newstate
Referenced from: /Users/gl/workspace/node-lua/build/Release/node_lua.node
Expected in: flat namespace
이 질문을 참조하십시오 http://stackoverflow.com/questions/8552560/embedding-lua-in-c/8552620#8552620 –
빌드 시스템에'obj.ldflags' 설정과 같은 것이 있습니까? 그렇다면 라이브러리를 설치하십시오. – Mat
@Mat 나는 잘 모르겠다. 사실 나는 C++의 newb이다. node-waf를 사용하여 node-addon을 작성하려고한다. 나는 그것을 google 할 것이다. 감사. –