Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 413 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xcode - ld: library not found for -lPods

#1
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 see invocation)

Ld /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox normal x86_64
cd /Users/Markus/Development/xcode/totalbox-ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -F/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -filelist /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreGraphics -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox_dependency_info.dat -o /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox

PODS ROOT in the build settings:

${SRCROOT}/Pods


I didn't create this Xcode project - just pulled it from git to check it out.
Reply

#2
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.


Reply

#3
If the project uses CocoaPods be aware to always open the `.xcworkspace` file instead of the `.xcodeproj` file.
Reply

#4
If you have multiple targets in your project, Cocoapods may have only integrated itself well with just one of them.

I had to manually link to `libPods.a` in "Link Binary With Libraries" for each additional target I had.

![libPods.a in my list of frameworks][1]


[1]:
Reply

#5
Had this problem as well. Something was wrong with my CocoaPods installation. No pods other than KIF were installing properly. I followed the comments on [this thread][1] to be of help.

Basically, I needed to ensure that `Build Active Architectures Only` settings for both my project and the Pods project were equal.


[1]:

[To see links please register here]

Reply

#6
For me, following had worked.

1. Go to "Project Target -> Build Settings -> Preprocessing -> Preprocessor Macros". Set "COCOAPODS=1" in all Debug, Integration, Release under "Preprocessor Macros"
2. Add the following in "Other Linker Flags" under "Project Target"
1. $inherited
2. -ObjC
3. -lc++
4. -all_load

Clean and run the project. If still error receives the same then try by setting "Project Target -> Build Settings -> Build Active Architectures Only", Set "Debug" to "YES" and set "Integration and Release" to "No". Then Repeat the same setting of "Build Active Architectures Only" for all "Pods Targets"

Clean and run the project. If you receive the following error

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).

Then try Mr. Mike answer in this link

[To see links please register here]


Hope it helps!
Reply

#7
My way

1. create new project and install pod it will can run without error.

2. Copy text in "Other Linker Flags" in new project to old project. Make old project to same new project.

3. Check "Header Search Paths" too.



Reply

#8
After hours of research this solution worked for me:

*(disclaimer: results may vary due to circumstances)*

the `Library not found -lPods-(someCocoapod)` error was due to multiple entries in the :

Settings(Target) > Build Settings > Linking > 'Other Linker Flags'

A lot of other posts had me look there and I would see changes to the error when I messed around with the entries, but I kept getting some variation on the same error.

Too many hours lost ...

## My Fix: ##
remove the -lPods-(someCocoaPod) lines in the 'Other Linker Flags' list **BUT** only if $(inherited) is at the top. At first I was unsure, but the reassuring sign was that I still saw references to my cocoapods when I left the edit mode(inherited). I tested in debug and release, both of which were giving me errors, and the problem was immediately resolved.


Reply

#9
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.

Reply

#10
When you clone project from somewhere which uses Cocoapods you need to install them to your project.

Here step-by-step what you need to do:

- 1) clone source code to local machine;
- 2) close the xcode project (if open);
- 3) install cocoapods application on your mac by running this command in terminal: "**gem install cocoapods**", add "**sudo** " in the beginning if did not work;
- 4) go to the root of your xcode project by using "**cd**" command in terminal;
- 5) you should have Podfile in this folder; if you want to double check it use: "**cat Podfile**" command, it will display the content of this file with Libraries that will have to be installed to your project;
- 6) then use "**pod install**" command to download and install the Libraries to your project; the **Podfile.lock** will be created and **{Your project name}.xcworkspace** file;
- 7) from now on you have to use **{Your project name}.xcworkspace** to open it in xcode;

**Good luck!**
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through