友盟统计时出的错误

转载

今天试友盟统计时出现的错误:加入友盟的静态库之后运行出现如下错误

“_compress2”, referenced from:
+[UMANUtil deflatedDataPrefixedWith:level:source:] in libMobClickLibrary.a(UMANUtil.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

[转载]友盟统计时出的错误

解决方法是:在Other Linker Flags里加入-lz然后再编译通过
[转载]友盟统计时出的错误

类似的其他
“_compress2”, referenced from:
“_inflateReset”, referenced from:
inflateInit“, referenced from:
“_inflateEnd”, referenced from:
inflateInit2“, referenced from:
均可以通过-lz来解决。

-lz 会让你的程序在编译的时候against the built-in zlib,从而解决问题

你可能感兴趣的:(友盟统计时出的错误)