Archive Packaging Error Apple MACH-O Linker (ID) error

Source: Internet
Author: User

1: Case: Compile the real machine run can, packaging times wrong

Error content
Ld:bitcode bundle could not being generated because '/users/liuyuning/desktop/testdecode/decode/libdecode.a (DECODE.O) ' was built without full bitcode. All object files and libraries for Bitcode must is generated from Xcode Archive or Install build for architecture arm64
Clang:error:linker command failed with exit code 1 (use-v to see invocation)



2:bitcode is the new feature Apple has introduced in Xcode7 and beyond. For the two compilation of code, optimized for CPU, the compilation work is done by Apple AppStore backstage.
Available for iOS is optional and is turned on by default. WatchOS and TvOS are mandatory options. The Apple documentation is as follows

At this point, you need to add an option "-fembed-bitcode" to the Static library project. After that, you can archive normally.

Add "-fembed-bitcode"





Also, if the Static library project has-werror options, it needs to be removed. There should be a warning at compile time. Clang: Warning: argument unused during compilation: '-fembed-bitcode-marker '
If you do not remove it will be an error.


3: If method two is invalid, if

Then the third SDK you choose must also support bitcode for Yes

Archive Packaging Error Apple MACH-O Linker (ID) error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.