错误日志如下:
[ 50%] Building C object CMakeFiles/cmod_zlib.dir/lua_zlib.c.o
[100%] Linking C shared module zlib.so
Undefined symbols for architecture x86_64:
"_luaL_argerror", referenced from:
_lz_checksum in lua_zlib.c.o
"_luaL_buffinit", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_checklstring", referenced from:
_lz_checksum in lua_zlib.c.o
"_luaL_checkoption", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_newmetatable", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_luaL_optinteger", referenced from:
_lz_deflate_new in lua_zlib.c.o
"_luaL_prepbuffer", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_pushresult", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_register", referenced from:
_luaopen_zlib in lua_zlib.c.o
"_lua_call", referenced from:
_lz_checksum in lua_zlib.c.o
"_lua_concat", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_error", referenced from:
_lz_assert in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_getfield", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
"_lua_gettop", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_isnumber", referenced from:
_lz_inflate_new in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_isstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_newuserdata", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_version in lua_zlib.c.o
"_lua_pushboolean", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_pushcclosure", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_checksum_new in lua_zlib.c.o
"_lua_pushfstring", referenced from:
_lz_assert in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushinteger", referenced from:
_luaopen_zlib in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushlightuserdata", referenced from:
_lz_checksum_new in lua_zlib.c.o
"_lua_pushlstring", referenced from:
_luaopen_zlib in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushnil", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushnumber", referenced from:
_lz_version in lua_zlib.c.o
_lz_checksum_new in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_pushstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_pushvalue", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_replace", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_setfield", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_lua_setmetatable", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_settable", referenced from:
_luaopen_zlib in lua_zlib.c.o
"_lua_settop", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_lua_tointeger", referenced from:
_lz_inflate_new in lua_zlib.c.o
"_lua_tolstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_tonumber", referenced from:
_lz_checksum in lua_zlib.c.o
"_lua_touserdata", referenced from:
_lz_deflate_delete in lua_zlib.c.o
_lz_inflate_delete in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_type", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [zlib.so] Error 1
make[1]: *** [CMakeFiles/cmod_zlib.dir/all] Error 2
求大神解决。。