XCode 6.2 中使用 MMWormhole 库和 Watchkit 的链接器命令失败
Linker command failed in XCode 6.2 using MMWormhole Library and Watchkit
尝试构建应用程序时出现 "linker command failed with exit code 1" 错误。这是 Xcode:
中的错误
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MMWormhole", referenced from:
objc-class-ref in InterfaceController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
看起来库不是为 x86 架构构建的,但这只是我目前所读内容的粗略猜测。当我从 "Build Settings" 中的有效架构中删除架构时,错误消息消失了,但我得到了另一个。
有没有人对 MMWormhole 有一些经验并且知道该怎么做?
我猜你只在你的 iOS 应用程序目标中包含了 MMWormHole,而不是在你的 WatchKit 扩展中。如果您只是导入源代码而不是库,您需要检查源代码的目标并确保选择了 iOS 应用程序和 WatchKit 扩展(参见 Calling a Method on Watchkit)。如果您包含或构建库,则需要检查 iOS 应用和 WatchKit 扩展中的设置,并确保它们都链接到库。
尝试构建应用程序时出现 "linker command failed with exit code 1" 错误。这是 Xcode:
中的错误Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MMWormhole", referenced from:
objc-class-ref in InterfaceController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
看起来库不是为 x86 架构构建的,但这只是我目前所读内容的粗略猜测。当我从 "Build Settings" 中的有效架构中删除架构时,错误消息消失了,但我得到了另一个。
有没有人对 MMWormhole 有一些经验并且知道该怎么做?
我猜你只在你的 iOS 应用程序目标中包含了 MMWormHole,而不是在你的 WatchKit 扩展中。如果您只是导入源代码而不是库,您需要检查源代码的目标并确保选择了 iOS 应用程序和 WatchKit 扩展(参见 Calling a Method on Watchkit)。如果您包含或构建库,则需要检查 iOS 应用和 WatchKit 扩展中的设置,并确保它们都链接到库。