I'm doing native iOS application using SUP.As per documentation; i have included the library and given the link path in Xcode. While building getting following error:
Undefined symbols for architecture i386:
"_deflate", referenced from:
PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
"_deflateEnd", referenced from:
PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
"_deflateInit_", referenced from:
StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*, long), void*, void**) in libMo.a(tlplatcompress.o)
"_deflateParams", referenced from:
StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*, long), void*, void**) in libMo.a(tlplatcompress.o)
"_inflate", referenced from:
PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
"_inflateEnd", referenced from:
PlatCompress(enumCompressOperation, CompressCookie*, void*, long) in libMo.a(tlplatcompress.o)
"_inflateInit_", referenced from:
StartCompression(enumCompressOperation, unsigned char, long (*)(void*, void*, long), void*, void**) in libMo.a(tlplatcompress.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me how to solve this error.I'm new to native iOS development using SUP.
Thanks.
I also had a same error.
Add libz.dylib to framework from the target -> Build Phases tab -> Link Binaries With Libraries,
hope that will work for you.
Note: If libz.dylib not found, try adding libz.tbd
Starting with Xcode 7, instead of adding libz.dylib, you should do this:
Build Settings
tabOther Linker Flags
-lz
as a linker flag (see screenshot)Product
menu, select Clean
before building againIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With