现在的位置: 首页 > 综合 > 正文

Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/

2018年07月14日 ⁄ 综合 ⁄ 共 462字 ⁄ 字号 评论关闭

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

  1. ld: library not found for -lz.1.2.3  
  2. collect2: ld returned 1 exit status  
  3. 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;

抱歉!评论已关闭.