Linker command failed with exit code 1 (use-v to see invocation), the advent and resolution of classic Xcode compilation errors!

Source: Internet
Author: User

Linker command failed with exit code 1 (USE-V-to-see invocation) This must be a Xcode compile run when the classic error.

This problem was once a few times when my project was compiled and run, but it was never recorded. Now you want to make a record of it every time you appear, so that you have a faster way to find a solution to the same problem later on.

Linker command failed with the exit code 1 (use-v to see invocation) There are a number of situations, the following is the situation I encountered today, and will be met in the next 1.1 points of the record, welcome to have a friend to me to review or batch , I will add the other things I met later.

This article directory:

1. Error message (and simple analysis)

2. Workaround

Linker command failed with exit code 1 (use-v to see invocation) is the error message:

1?? Here's a look at the error:

Simple analysis: Look at the above line of information:

Ld:5 duplicate symbols for architecture x86_64: ======>>>> The meaning of this line of text is compiled on the x86_64 platform with 5 duplicate elements:

2?? In fact, my project in the import of an additional file, an error occurred, I mistakenly import the same file into a wrong directory, and the place I want to import again, so that my compiler at compile time do not know which to use, because their content, the path is different. So the compiler will report the error above. Now that you have found the problem, it is OK to remove the error path and run it again.

Summarize:

This is the one I met today. A duplicate import causes the compiler not to know which problem to use. So be careful when adding files!

Linker command failed with exit code 1 (use-v to see invocation), the advent and resolution of classic Xcode 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.