关于l ibrary not found for -lz.1.2.3 编译错误

简介:

今天在下载一个Demo编译时,提示如下错误

ld: library not found for -lz.1.2.3 collect2: ld returned 1 exit status Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 



lz.1.2.3指的是libz.1.2.3.dylib动态库文件,这是因为iOS5以后,也就是xcode4.2以后就没有libz.1.2.3.dylib了,取而代之是libz.1.2.5.dylib;


解决办法:删除libz.1.2.3.dylib,添加libz.1.2.5.dylib,运行成功,如果直接在原来工程上添加libz.1.2.5.dylib,仍会编译错误,所以要删除libz.1.2.3.dylib;


     本文转自新风作浪 51CTO博客,原文链接:http://blog.51cto.com/duxinfeng/1208685 ,如需转载请自行联系原作者


相关文章
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
|
5月前
|
Linux C++
【C++编译】C++ error:‘syscall’ was not declared in this scope
sys/syscall.h 内部表示,他封装了![[Pasted image 20220818151746.png]] 打开对应的 syscall.h 文件内部依旧没有 syscall()函数的声明。
33 0
NDK编译doubango时出现错误:undefined reference to ‘stderr‘
NDK编译doubango时出现错误:undefined reference to ‘stderr‘
95 0
|
程序员 C++ 编译器
error LNK2005 已经在***.obj中定义 的解决办法
为什么会出现这个错误??“error LNK2005: 已经在aaa.obj中定义” 编程中经常能遇到LNK2005错误——重复定义错误,其实LNK2005错误并不是一个很难解决的错误。弄清楚它形成的原因,就可以轻松解决它了。
3770 0