tsubaki / UnityZip

Other
167 stars 51 forks source link

clang: error: linker command failed with exit code 1 (use -v to see invocation) #21

Open anandp803 opened 3 years ago

anandp803 commented 3 years ago

hello

Please help me out i am getting this error always

i am using unity 2019.4.4f1 with uniZip plugin i have upgraded my project form 2019.2.2f1 In 2019.2.2f1 it is working fine with xcode but when i build it wih 2019.4.4f1 it gives below error in xcode

"_deflate", referenced from: _zipWriteInFileInZip in zip.o _zipCloseFileInZipRaw in zip.o (maybe you meant: _unity_z_deflateCopy, _unity_z_deflateBound , _unity_z_deflateTune , _unity_z_deflatePending , _unity_z_deflateSetHeader , _unity_z_deflateParams , _zdeflateInit , _il2cpp_z_deflate_copyright , _il2cpp_z_deflateTune , _il2cpp_z_deflatePrime , _il2cpp_z_deflatePending , _il2cpp_z_deflateSetDictionary , _il2cpp_z_deflateReset , _il2cpp_zdeflateInit , _unity_z_deflateSetDictionary , _unity_z_deflateEnd , _il2cpp_z_deflateEnd , _il2cpp_z_deflateCopy , _il2cpp_zdeflateInit2 , _unity_z_deflateGetDictionary , _unity_z_deflatePrime , _unity_z_deflate , _il2cpp_z_deflateResetKeep , _il2cpp_z_deflateGetDictionary , _unity_z_deflateResetKeep , _il2cpp_z_deflate , _unity_z_deflateReset , _unity_z_deflate_copyright , _il2cpp_z_deflateParams , _il2cpp_z_deflateSetHeader , _zdeflateInit2 , _il2cpp_z_deflateBound ) "_get_crc_table", referenced from: _zipOpenNewFileInZip3 in zip.o (maybe you meant: _unity_z_get_crc_table, _il2cpp_z_get_crc_table ) "_deflateEnd", referenced from: _zipCloseFileInZipRaw in zip.o (maybe you meant: _unity_z_deflateEnd, _il2cpp_z_deflateEnd ) "deflateInit2", referenced from: _zipOpenNewFileInZip3 in zip.o (maybe you meant: _il2cpp_zdeflateInit2, _zdeflateInit2 ) "_crc32", referenced from: -[ZipArchive addFileToZip:newname:] in ZipArchive.o _zipWriteInFileInZip in zip.o (maybe you meant: _unity_z_crc32_combine64, _unity_z_crc32_combine , _il2cpp_z_crc32_combine , _il2cpp_z_crc32_z , _il2cpp_z_crc32 , _unity_z_crc32 , _unity_z_crc32_z , _il2cpp_z_crc32_combine64 ) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

akrimahuzaifa commented 1 year ago

To-do's for UniZip for Unity & XCode:

Alterations for UniZip for iOS successful build:

-line 270[dc release] -line 271[gregorian release] -line 327[comp release] -line 328[gregorian release] -line 40[super delloc]

(2) Open "UnityZipFile.mm" file and REMOVE:

-line 32[zip release] -line 35[list release] -line 59[zip release]

-Before Build in XCode select "unity framework" from "unity iPhone" and go to "build settings>other>flags" add "-lz" symbol.

contribution by: https://github.com/Ad-mob-dev