Perfect solution: "Library not found for-"

Source: Internet
Author: User
analyze the cause and solve the problem

When Xcode compiles, you may encounter the error "Library not found for-", which is why.

Because we use some third party library in the project, such as Baidu's static library. When the Xcode is not found in the compilation of this library, so we want to let Xcode know where the library file, so that the compile time can easily find the library.

Workaround:
Gets the file path of the library file, added to target's build settings interface, as shown in the figure:

if the above method has not been solved, there are 3 methods below

method One: Click on the XCode project file and see "Link Binary with Libraries" in build phases if you're not too predictable, you should be able to see that one or several entries are displayed in a red font. These files, which are referenced by the project, have physical files that are not in the place previously recorded. In this case, right click on the red entry, select "Reveal in Project Navigator", at this time can be in the left-hand column to locate the missing file path, then it is good to do, find the missing file, move back to where it should be.

method Two: at the target of the project, select the target to perform the compilation, then "Get Info", open the Build Settings page and add the path to the folder where the missing link library is located in "Library Search path."

method Three: turn off the Xcode, open the console to the engineering directory, reinstall with the pod Install command, and then open the Xcode compile project after success. how to deal with common problems

The problem with summarizing 1:library not found for-xxx is that there may be a problem with the connection reference for one of your libraries, and the solution is to select link Binary with libraries in the project target. A or framework cancellation and join , it's OK.

A summary of 2:warning:directory not found option may be the framework search paths and the library search paths there is no such a path, delete it.

Summary 3:duplicate is the meaning of repetition, then look at the code to remove the duplicate openudid, as well as Libwoa_two and Sbjson conflict, delete the Sbjson point M can.

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.