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!