这个问题一直让我发疯,我无法解决该问题。
Undefined symbols for architecture armv7:
"_deflateEnd", referenced from:
-[ASIDataCompressor closeStream] in ASIDataCompressor.o
"_OBJC_CLASS_$_ASIDataDecompressor", referenced from:
objc-class-ref in ASIHTTPRequest.o
"_deflate", referenced from:
-[ASIDataCompressor compressBytes:length:error:shouldFinish:] in ASIDataCompressor.o
"_deflateInit2_", referenced from:
-[ASIDataCompressor setupStream] in ASIDataCompressor.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
我认为这与以下方面有关:
ld: symbol(s) not found for architecture armv7
但是我补充道:libz.1.2.3.dylib
这没有帮助,任何人有任何想法吗?
nm -g
在调用该符号的文件和应该包含该符号的文件上运行,您应该查看它们是否匹配,这可以为错误提供线索。nm -g file.o您可以检查与此脱胶的C ++符号:nm -gC file.o
Undefined symbols for architecture armv7: "YGConfig::YGConfig(int (*)(YGConfig*, YGNode*, YGLogLevel, char const*, void*))", referenced from: _YGConfigNew in libyoga.a(Yoga.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
-ObjC
其他链接器标志,因此您正在使用的外部静态库中的Obj-C是不可见的(例如从Parse的可见)。如果是这种情况,请参阅我的回答:stackoverflow.com/a/26151208/901641