简体   繁体   中英

Can't install SDWebImage with CocoaPods : “ld: library not found for -lSDWebImage”

I'm trying to import SDWebImage into my iOS project using Cocoapods.

So I have installed Cocoapods, and created this Podfile into my project directory :

platform :ios, '7.0'
target 'MyProjectV6' do
pod 'SDWebImage', '~>3.7'
end

Then I run it with the pod install command, and everything seems to be fine :

Analyzing dependencies
Downloading dependencies
Installing SDWebImage 3.7.5 (was 3.7.5)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

I also see in Xcode a Pods folder created into my project directory. It contains two .xcconfig files like this :

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = $(inherited) -ObjC -l"SDWebImage" -framework "ImageIO"
PODS_ROOT = ${SRCROOT}/Pods

But when I build my project, I get this error :

在此处输入图片说明

I also have a "libPods-MyProjectV6.a" added into my Frameworks folder, but the text is red, so I guess something is wrong but I don't know what...

Thanks for your help.

Did you open Workspace or Project file? Verify that you open first one

Have you tried this?

rm -rf Pods/ Podfile.lock
pod install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM