正式在我mac系统上安装完成lua5.2.1版本。
结果go编译第一个包,提示的是:
# Lib/golua/lua
Undefined symbols for architecture x86_64:
"_lua_tonumber", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_tonumber in golua.cgo2.o
(maybe you meant: _lua_tonumberx, __cgo_7bf27e0e26b2_Cfunc_lua_tonumber )
"_lua_tointeger", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_tointeger in golua.cgo2.o
_clua_atpanic in c-golua.o
_callback_panicf in c-golua.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_tointeger, _lua_tointegerx )
"_luaL_loadfile", referenced from:
__cgo_7bf27e0e26b2_Cfunc_luaL_loadfile in lauxlib.cgo2.o
(maybe you meant: _luaL_loadfilex, __cgo_7bf27e0e26b2_Cfunc_luaL_loadfile )
"_lua_yield", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_yield in lua.cgo2.o
(maybe you meant: _lua_yieldk, __cgo_7bf27e0e26b2_Cfunc_lua_yield )
"_lua_setfenv", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_setfenv in lua.cgo2.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_setfenv)
"_lua_pcall", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_pcall in lua.cgo2.o
(maybe you meant: _lua_pcallk, __cgo_7bf27e0e26b2_Cfunc_lua_pcall )
"_lua_objlen", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_objlen in lua.cgo2.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_objlen)
"_lua_lessthan", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_lessthan in lua.cgo2.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_lessthan)
"_lua_getfenv", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_getfenv in lua.cgo2.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_getfenv)
"_lua_equal", referenced from:
__cgo_7bf27e0e26b2_Cfunc_lua_equal in lua.cgo2.o
(maybe you meant: __cgo_7bf27e0e26b2_Cfunc_lua_equal)
"_lua_call", referenced from:
_clua_openos in c-golua.o
_clua_opentable in c-golua.o
_clua_openstring in c-golua.o
_clua_openpackage in c-golua.o
_clua_openmath in c-golua.o
_clua_openio in c-golua.o
_clua_openbase in c-golua.o
...
(maybe you meant: _lua_callk)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
编译您的那个包,提示的是:
# Lib/glua
error: 'lua_tointeger' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: 'luaL_loadfile' undeclared (first use in this function)
error: 'lua_tonumber' undeclared (first use in this function)
error: 'lua_pcall' undeclared (first use in this function)
error: 'lua_call' undeclared (first use in this function)
exit status 2
请指教。