Because recently took over to do Static library colleague's work, such inevitable integration debugging Ah, but after integration always appear linker command failed with exit code 1 This error, check a lot of information, finally solved, today on this issue to do a discussion, In order to prevent the same mistakes in the future, I first say I this project inside the wrong solution, and then general say other solutions.
Okay, this is my show. linker command failed with exit code The wrong solution is also one of the reasons for this error, and the response path of the static library is not correct.
Okay, here's the linker command failed with exit code error All the workarounds are listed for later use
1. Multiple-person-developed file conflicts or. m did not add problems with the following error:
Solution: Find the name of the class that appears, find the. m, such as a local hook.
2.
If it is a newly added third-party library and is not a static library
repeat the first step process and then find Build settings->linking->other Linker Flags, such as
Modify this property to-all_load or-OBJC, depending on the situation. In short, you can try more than a few times.
3. If you are adding a third-party static library (. a file)
There were errors in all the files used in this library, as above
homeviewcontroller.o
Classes and
analysisviewcontroller.o
Class
This could be a link error caused by this static library path confusion.
Workaround: Build settings->search path->library Search Paths add the appropriate path to the static library. As
4. It is also common to see if a newly added file has the same name as the previous file.
5. The name of a class appears in the error message, go to the original file to see what third-party libraries #import, exclude these libraries from one another, find the wrong library, and then follow the official steps to add it again .
The above is the general solution of the above errors, if not resolved, it is only a way out.
Now that we've talked about the confusion of third-party static library paths, I'll talk to you about this path next, which is one of the common mistakes.
< Span style= "line-height:18px" >