Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anandp803 opened this issue Mar 23, 2021 · 1 comment

Comments

@anandp803
Copy link

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 , z_deflateInit , _il2cpp_z_deflate_copyright , _il2cpp_z_deflateTune , _il2cpp_z_deflatePrime , _il2cpp_z_deflatePending , _il2cpp_z_deflateSetDictionary , _il2cpp_z_deflateReset , il2cpp_z_deflateInit , _unity_z_deflateSetDictionary , _unity_z_deflateEnd , _il2cpp_z_deflateEnd , _il2cpp_z_deflateCopy , il2cpp_z_deflateInit2 , _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 , z_deflateInit2 , _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_z_deflateInit2, z_deflateInit2 )
"_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
Copy link

akrimahuzaifa commented Oct 13, 2022

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

  • add "PluginsCode>iOS>ZipArchive" files & folder to Unity project "Assets\Plugins\iOS"
  • After that copy from package UnityZip: ">Asset>Plugins" (folders, files) & add to your project VTDB: "\Assets\Plugins"

Alterations for UniZip for iOS successful build:

  • If package is newly imported after above setup:
    (1) Open "ZipArchive.mm" file and REMOVE:

-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants