我已经创建了一个名为 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) -> () in 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 回答的帖子,它帮助我和其他人解决了这个问题,并被要求作为这个问题的答案.
这篇关于未找到自动链接框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!