如果你已经有了pb.h和des.h,一般在lua_extensions下面,可以在xcode中直接查找
再修改lua_extensions_more.c文件,如下即可:
static luaL_Reg luax_exts[] = {
{"cjson", luaopen_cjson_safe},
{"zlib", luaopen_zlib},
{"pack", luaopen_pack},
#ifndef WP8
{"lfs", luaopen_lfs},
#endif
#if CC_USE_SQLITE
{"lsqlite3", luaopen_lsqlite3},
#endif
{"des", luaopen_des},
{"pb", luaopen_pb},
{NULL, NULL}
};
这样启动时就会注册这些库到lua中了!