找不到自动链接框架 [英] Auto-Linking framework not found

查看:132
本文介绍了找不到自动链接框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个名为BTNavigationDropdownMenu的框架(适用于ios的swift项目).一切正常,直到我尝试在我创建的分支中向最新版本添加依赖项为止.无论我是通过podfile还是通过Carthage添加其他框架(DYBadge),问题都是相同的.

I have forked a framework called BTNavigationDropdownMenu (swift project for ios). all worked fine till I tried to add a dependency to the latest version in the branch I created. the problem is the same whether I add the other framework (DYBadge) through a podfile or through Carthage.

找不到自动链接框架DYBadge.

作为DYBadge一部分的UIView扩展名似乎有问题.

It seems to have a problem with a UIView extension that is part of DYBadge.

DYBadge在我正在使用的主应用程序中工作正常(在应用程序目标中也需要它).

DYBadge works fine in my main app I'm working on (I also need it in the app target).

以下错误.感谢您对正确方向的任何提示.

errors below. thanks for any hints into the right direction.

ld:警告:找不到自动链接框架DYBadge未定义 架构x86_64的符号:(扩展名为 DYBadge):__ ObjC.UIView.getBadge()-> DYBadge.DYBadge?",已引用 从: Demo.BTNavigationDropdownMenu.updateBadge(text:Swift.String,at:Swift.Int)->()BTNavigationDropdownMenu.o ld:符号不 为体系结构x86_64 clang找到了:错误:链接程序命令失败 退出代码1(使用-v查看调用)

ld: warning: Auto-Linking framework not found DYBadge Undefined symbols for architecture x86_64: "(extension in DYBadge):__ObjC.UIView.getBadge() -> DYBadge.DYBadge?", referenced from: Demo.BTNavigationDropdownMenu.updateBadge(text: Swift.String, at: Swift.Int) -> () in BTNavigationDropdownMenu.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

推荐答案

Xcode找不到您的框架,因为FRAMEWORK_SEARCH_PATHS可能未设置或错误(发生在我身上,因为我移动了Info.plist文件) .

Xcode is not able to find your frameworks because the FRAMEWORK_SEARCH_PATHS is probably not set or is wrong (happened to me because I moved the Info.plist file).

您可以通过进入目标并修改构建设置"来解决此问题.只需在其中搜索FRAMEWORK_SEARCH_PATHS并添加正确的名称,通常为$(PROJECT_DIR)/Carthage/Build/iOS(对于iOS项目). $(inherited)也应该作为第一个条目出现在其中.

You can fix this by going into your target and adapt the Build Settings. Simply search in there for FRAMEWORK_SEARCH_PATHS and add the correct one, which is usually $(PROJECT_DIR)/Carthage/Build/iOS (for iOS projects). $(inherited) should also be in there as the first entry.

这是@ user3122959答案中的帖子,它帮助我和其他人解决了此问题,并被要求作为此问题的答案.

这篇关于找不到自动链接框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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