How to troubleshoot duplicate symbols for architecture x86_64 compilation errors

Source: Internet
Author: User

Ld:5 duplicate symbols (the attributes that appear here are the key to the problem) _count for architecture x86_64

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

/users/zxtw/library/developer/xcode/deriveddata/fightlandlord-gfkaxalabyaagtcimlrskdbtudbx/build/intermediates /fightlandlord.build/debug-iphonesimulator/fightlandlord.build/objects-normal/i386/viewcontroller.o

A look at the error message indicates a link error. In translation, you can first know that the error message is an error when linking XXXX.O, (. O is a linked file). And then the bottom ld:5 Duplicate symbols for architecture x86_64 It means that there are 5 repeating symbols in the x86-64 architecture (several of us do not need to), repetition is a keyword, and the following two scenarios can cause this error to occur:One: Some files have been imported repeatedly in the project. This is typically imported in a three-party library. Workaround: Simply find the file in the files directory to duplicate the imported file, delete it, or remove the entire tripartite library, re-import it, or import it with cocopods. Two: Needed in some parts of the project Import "XXXX.h" and #import "XXXX.M". Solution: Carefully check the project, find the wrong correction can be.

Three. The property has a problem with the declaration

For example, if this is the case, the problem may appear on the declaration of the property Count

As for the other reasons are still in silent cognition ...

How to troubleshoot duplicate symbols for architecture x86_64 compilation errors

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.