sdwebimage: UIImageView+WebCache.h: 没有那个文件或目录 [英] sdwebimage: UIImageView+WebCache.h: No such file or directory

查看:25
本文介绍了sdwebimage: UIImageView+WebCache.h: 没有那个文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 ios 开发还很陌生 - 尝试在我的 iphone 项目中使用 sdwebimage.我相信我已按要求完成了所有基本设置.但是当我构建时,我收到这个错误:在这一行附近没有这样的文件文件或目录:

I am fairly new to ios development - trying to use sdwebimage in my iphone project. I believe I completed all basic setups as required. But when I build, I get this error: No such file file or directory near this line:

#import "UIImageView+WebCache.h"

  • 是的,我添加了目标依赖项
  • 我在 Link Binary With Libraries 中添加了 libSDWebImage.a
  • 我在其他链接器标志中有 -all_load -ObjC
  • 我还尝试了 -force_load ${BUILT_PRODUCTS_DIR}/libSDWebImage.a(64 位 mac)
  • 我使用的标题搜索路径是:$(BUILT_PRODUCTS_DIR)
  • 我清理了项目并重建了 - 但没有用.
  • 构建一直失败.同样,当我输入 #import "UI & 点击 "ctrl+space" 时,XCode4 代码完成解析",这意味着该库对 xcode 可见.任何指针都会非常有用.谢谢.

    Build keeps failing. Again, XCode4 code completion "resolves" when I type #import "UI & hit "ctrl+space" which means the lib is visible to xcode. Any pointers will be super helpful. Thanks.

    推荐答案

    要将所需的头文件添加到构建路径,请执行以下操作.

    To add the needed header files to the build path do the following.

    1. 选择您的项目文件
    2. 选择你的目标
    3. 选择构建设置
    4. 在搜索框中输入标题搜索路径"
    5. 为发行版添加 "$(SOURCE_ROOT)/SDWebImage"(带引号的).
    1. Select your project file
    2. Select your target
    3. Select Build settings
    4. In the search box enter 'header search paths'
    5. For the Release add "$(SOURCE_ROOT)/SDWebImage" (thats with quotes).

    这将在像这样导入时起作用 #import <SDWebImage/UIImageView+WebCache.h>

    This will work when importing like this #import <SDWebImage/UIImageView+WebCache.h>

    这篇关于sdwebimage: UIImageView+WebCache.h: 没有那个文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆