Xcode - ld: library not found for -lPods

后端 未结 22 1405
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 18:27

I get these errors when I try to build an iOS application.

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to s         


        
相关标签:
22条回答
  • 2020-11-28 18:44

    This problem-related to lPods can be fixed by following the steps below

    • Select your Project Target.
    • Go to "Build Phases" in "Link Binary With Libraries".
    • Now remove ".a" file of that library which is creating the problem.
    • Clean and Build.

    This will work.

    0 讨论(0)
  • 2020-11-28 18:44

    My steps:

    1. Delete the pods folder and the 'Pods' file.
    2. Type "pod install" into Terminal.
    3. Type "pod update" into Terminal.

    In addition to making sure "Build Active Architectures" was set to YES as mentioned in previous answers, this was what had done it for me.

    0 讨论(0)
  • I had the same problem

    pod install and pod update on command line resolve my problem

    0 讨论(0)
  • 2020-11-28 18:45

    Delete all the corresponding files/folders of imported cocoapods source except podfile.

    install cocoapod again.This should clear any redundant pull from the original source.

    0 讨论(0)
  • 2020-11-28 18:45

    I got the same error.

    The issue: I created a separate Workspace and added my existing project into it. I got the error when I worked on that Workspace.

    The fix: Later I found that Workspace gets created automatically inside the existing project when dependencies are added. And have to work on that workspace.

    0 讨论(0)
  • 2020-11-28 18:46

    None of the above answers fixed it for me.

    What I had done instead was run pod install with a pod command outside of the target section. So for example:

    #WRONG
    pod 'SOMEPOD'
    
    target "My Target" do
        pod 'OTHERPODS'
    end
    

    I quickly fixed it and returned the errant pod back into the target section where it belonged and ran pod install again:

    # CORRECT
    target "My Target" do
        pod 'SOMEPOD'
        pod 'OTHERPODS'
    end
    

    But what happened in the meantime was that the lib -libPods.a got added to my linked libraries, which doesn't exist anymore and shouldn't since there is already the -libPods-My Target.a in there.

    So the solution was to go into my Target's General settings and go to Linked Frameworks and Libraries and just delete -libPods.a from the list.

    0 讨论(0)
提交回复
热议问题