iOS导入zlib linker -error "_inflate", referenced from: XXX

error when import zlib in iPhone sdk
当编译时出现这底下这些错误:

"_inflate", referenced from: XXX

"deflateInit", referenced from: XXX
"inflateInit", referenced from: XXX
"_deflateEnd", referenced from: XXX
"_inflateEnd", referenced from: XXX

说明你没有链接zlib库。

在项目的Targets->build Settings->Other Linker Flags 添加 -lz,然后clean 项目,重新编译就好了,如下图:


iOS导入zlib linker -error
屏幕快照 2016-06-17 下午4.14.53.png

你可能感兴趣的:(iOS导入zlib linker -error "_inflate", referenced from: XXX)