Sometimes under Xcode, we need to introduce a third-party class library or a static library written by ourselves. If the configuration is not correct, the following error will occur
ld: library not found for -XXXX
clang: error: linker command failed with exit code 1 (use -v to see invocation)。
Most of the time, there may be a problem with the connection reference of one of your libraries. The solution is to select. A or framework in link binary with libraries in the target of the project, cancel it and then add it
Modification method
1. Configuration under target
Target->”Build Phases”->”Link binary With Libraries”
This is the name of the library to add. If it's an internal Xcode library, just look for it and add it. If you are looking for a third-party static or dynamic library, you will need to click "Add Other..." to install it.
2、Project
If you have found or written a third-party static or dynamic library, you also need to add the paths
Project-> "Build Setting"-> "Search Paths"-> "Library search Paths"
Add the path where the library is located
3. Configuration under other link flags (it may not be processed after deleting the third party framework)
Target->” Build Setting”->”Other Link Flags, Find the third party related to the error report, select it and then click on the minus sign to delete it
Similar Posts:
- [Solved] QT operate error: exited with code – 1073741515
- [How to Solve] directory not found for option
- Cordova/CDVPlugin.h file not found [How to Solve]
- LIBRARY_ Path and LD_ LIBRARY_ The difference of path environment variable
- Iosbug debug-01-error-duplicate symbols for architecture
- iOS dyld: Library not loaded Error [How to Solve]
- Xcode Error: Command CodeSign failed with a nonzero exit code
- Cmake solves the problem of phread Library in C + + 11: undefined reference to ` pthread_ create’