gpt4 book ai didi

ios - Mach-O 链接器错误 - 文件已正确导入(并检查)但仍然出错?

转载 作者:行者123 更新时间:2023-11-29 12:33:06 25 4
gpt4 key购买 nike

我知道有无数的 Mach-O 链接器错误帖子,我至少浏览了十几个,试图找到解决我的问题的方法。许多解决方案评论说我必须“选中此框”或检查编译源以确保我的 .m 文件已正确导入,是的,我做了所有这些。我已经在这几个小时了,但我似乎无法从以下错误中得到任何结果:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_JSQMessage", referenced from:
objc-class-ref in ChatView.o
"_OBJC_CLASS_$_JSQMessagesAvatarImageFactory", referenced from:
objc-class-ref in ChatView.o
"_OBJC_CLASS_$_JSQMessagesBubbleImageFactory", referenced from:
objc-class-ref in ChatView.o
"_OBJC_CLASS_$_JSQMessagesTimestampFormatter", referenced from:
objc-class-ref in ChatView.o
"_OBJC_CLASS_$_JSQMessagesViewController", referenced from:
_OBJC_CLASS_$_ChatView in ChatView.o
"_OBJC_CLASS_$_JSQPhotoMediaItem", referenced from:
objc-class-ref in ChatView.o
"_OBJC_CLASS_$_JSQSystemSoundPlayer", referenced from:
objc-class-ref in ChatView.o
"_OBJC_METACLASS_$_JSQMessagesViewController", referenced from:
_OBJC_METACLASS_$_ChatView in ChatView.o
"_kJSQMessagesCollectionViewCellLabelHeightDefault", referenced from:
-[ChatView collectionView:layout:heightForCellTopLabelAtIndexPath:] in ChatView.o
-[ChatView collectionView:layout:heightForMessageBubbleTopLabelAtIndexPath:] in ChatView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何有关修复上述错误的帮助或建议都将不胜感激,并最终让我摆脱这个令人抓狂的障碍。提前致谢!

最佳答案

我在通过 Cocoapods 使用这个库时遇到了同样的错误。我在执行 pod install 时注意到这条警告消息:

[!] The Application [Debug] target overrides the OTHER_LDFLAGS build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation

我在项目的build设置中将 $(inherited) 添加到 OTHER_LDFLAGS 并解决了问题!

关于ios - Mach-O 链接器错误 - 文件已正确导入(并检查)但仍然出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27088140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com