[英]Can't install SDWebImage with CocoaPods : “ld: library not found for -lSDWebImage”
我正在尝试使用Cocoapods将SDWebImage导入我的iOS项目。
所以我已经安装了Cocoapods,并在我的项目目录中创建了这个Podfile:
platform :ios, '7.0'
target 'MyProjectV6' do
pod 'SDWebImage', '~>3.7'
end
然后我使用pod install
命令运行它,一切似乎都很好:
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.
我还在Xcode中看到一个在我的项目目录中创建的Pods
文件夹。 它包含两个.xcconfig
文件,如下所示:
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
但是当我构建项目时,出现此错误:
我还在我的Frameworks文件夹中添加了一个“ libPods-MyProjectV6.a”,但该文本为红色,因此我猜出了什么问题,但我不知道...
谢谢你的帮助。
您是否打开了Workspace或Project文件? 确认您打开了第一个
你有尝试过吗?
rm -rf Pods/ Podfile.lock
pod install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.