Questions tagged «iobluetooth»

24
Xcode构建失败“体系结构x86_64的未定义符号”
Xcode初学者的问题: 这是我第一次使用Xcode 4.6.3。 我正在尝试编写一个非常简单的控制台程序,该程序搜索配对的BT设备并将其打印到NSLog。 生成时出现以下错误: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_IOBluetoothDevice", referenced from: objc-class-ref in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 我疯狂地搜寻。常见的问题应该是对文件的引用,该文件仅导入了头文件,而链接器未找到任何实现(* .m文件)。但是,IOBluetooth库是一个类似于Foundation框架的标准框架。 我在上述声明中缺少什么? 我也尝试过为32位计算机构建它(构建再次失败)。显然这是一个链接器错误,但是我不知道它与它之间的关系,除了在x86和x64体系结构上查找IOBluetoothDevice的实现存在问题之外,而头文件来自一个包含在标准中的Framework(称为IO蓝牙? 供您参考,我的主要代码“ main.m”为: #import <Foundation/Foundation.h> #import <IOBluetooth/objc/IOBluetoothDevice.h> // Note the …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.