ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphonesimulator'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphoneos'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Release-iphoneos'
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneDevice.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneSimulator_4_0_GM.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_deflateInit2_", referenced from:
-[ASIDataCompressor setupStream] in ASIDataCompressor.o
"_deflateEnd", referenced from:
-[ASIDataCompressor closeStream] in ASIDataCompressor.o
"_deflate", referenced from:
-[ASIDataCompressor compressBytes:length:error:shouldFinish:] in ASIDataCompressor.o
"_inflateInit2_", referenced from:
-[ASIDataDecompressor setupStream] in ASIDataDecompressor.o
"_inflateEnd", referenced from:
-[ASIDataDecompressor closeStream] in ASIDataDecompressor.o
"_inflate", referenced from:
-[ASIDataDecompressor uncompressBytes:length:error:] in ASIDataDecompressor.o
"_OBJC_CLASS_$_OMAppMeasurement", referenced from:
objc-class-ref in OmnitureService.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
我收到此错误即使我将libz1.2.5.dylib包含到我的项目中。
我正在使用X-Code 4.2 for IOS Beta Version
@ All
任何人请告诉解决问题。
答案 0 :(得分:71)
编辑:从Xcode 7开始,libz.dylib已重命名为libz.tbd
我通过将libz.dylib添加到链接库来解决此问题。
遵循本指南: http://allseeing-i.com/ASIHTTPRequest/Setup-instructions
答案 1 :(得分:5)
您需要按照这组说明使用此API http://allseeing-i.com/ASIHTTPRequest/Setup-instructions,我相信您没有在项目中添加libz.dylib
答案 2 :(得分:4)
确保所有相关目标与libz相关联。您可以将其添加到目标A并尝试编译缺少它的目标B.
答案 3 :(得分:1)
请确保您正确链接libz,例如。检查它是否包含在“Link Binary With Libraries”构建目标阶段。
答案 4 :(得分:0)
我不是100%肯定,但它说“对于架构i386”......应该是armv6或armv7 ...... 所以我会检查你的构建步骤......
答案 5 :(得分:0)
在Xcode 8中,libz.dylib已重命名为libz.tbd