0
votes

I can not seem to link lPods in any project. I have tried in existing projects to no success, then just to see what would happen I created a new Project, and I still had the same problem.

Here is the error message.

Ld build/Debug-iphonesimulator/testPods.app/testPods normal i386 cd /Users/chrisalmond/Desktop/testPods export IPHONEOS_DEPLOYMENT_TARGET=7.1 export PATH="/Applications/Xcode51-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode51-Beta4.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode51-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode51Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/chrisalmond/Desktop/testPods/build/Debug-iphonesimulator -F/Users/chrisalmond/Desktop/testPods/build/Debug-iphonesimulator -filelist /Users/chrisalmond/Desktop/testPods/build/testPods.build/Debug-iphonesimulator/testPods.build/Objects-normal/i386/testPods.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -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/chrisalmond/Desktop/testPods/build/testPods.build/Debug-iphonesimulator/testPods.build/Objects-normal/i386/testPods_dependency_info.dat -o /Users/chrisalmond/Desktop/testPods/build/Debug-iphonesimulator/testPods.app/testPods

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

I have tried every solution I can find, deleting architectures and rebuilding, played with Linker files but no success.

1
A common n00b error with CocoaPods is that you need to open the .xcworkspace file not the project. . otherwise you'll have to provide more info. - Jasper Blues
Yes am opening through the .xcworkspace - user1178982
You could try my usual 'brute force' approach answered below. Hope it helps. Otherwise, please post your Podfile contents. - Jasper Blues

1 Answers

0
votes

Not sure what's causing the problem. Perhaps you've changed your Podfile to include distinct targets?

I find that with CocoaPods things occasionally still get messed up, and here's the approach that I use to start over:

  • Delete your .xcworkspace
  • Delete your Pods/ directory
  • Delete your Podfile.lock

Next open the .xcodeproj and for each target do the following:

  • Remove libPods / libPods-targetName as a dependency.
  • Remove the 'Check Pods Manifest.lock' build-phase
  • Remove 'Copy Pods Resources' build-phase

Now run 'pod install' again.