我尝试在 OS X 10.9 上安装 bluez 和 Light Blue,但出现错误。
有人在 Mavericks 上成功安装过这些吗?
我收到 LightBlue 的此错误:
=== BUILD TARGET LightAquaBlue OF PROJECT LightAquaBlue WITH CONFIGURATION Release ===
Check dependencies
error: There is no SDK with the name or path '/Users/myname/Downloads/lightblue-0.4/src/mac/LightAquaBlue/macosx10.6'
** INSTALL FAILED **
The following build commands failed:
Check dependencies
(1 failure)
我收到 pyBluez 的错误:
osx/_osxbt.c:676:5: error: unknown type name 'IOBluetoothDeviceInquiryRef'; did you mean 'IOBluetoothDeviceRef'?
IOBluetoothDeviceInquiryRef inquiry;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
IOBluetoothDeviceRef
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/IOBluetooth.framework/Headers/IOBluetoothUserLib.h:34:47: note: 'IOBluetoothDeviceRef' declared here
typedef struct OpaqueIOBluetoothObjectRef * IOBluetoothDeviceRef;
^
osx/_osxbt.c:688:17: error: unknown type name 'IOBluetoothDeviceInquiryRef'; did you mean 'IOBluetoothDeviceRef'?
IOBluetoothDeviceInquiryRef inquiryRef,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
IOBluetoothDeviceRef
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/IOBluetooth.framework/Headers/IOBluetoothUserLib.h:34:47: note: 'IOBluetoothDeviceRef' declared here
typedef struct OpaqueIOBluetoothObjectRef * IOBluetoothDeviceRef;
^
osx/_osxbt.c:703:19: warning: implicit declaration of function 'IOBluetoothDeviceInquiryCreateWithCallbackRefCon' is invalid in C99 [-Wimplicit-function-declaration]
dd->inquiry = IOBluetoothDeviceInquiryCreateWithCallbackRefCon (&dd);
^
osx/_osxbt.c:703:17: warning: incompatible integer to pointer conversion assigning to 'IOBluetoothDeviceRef' (aka 'struct OpaqueIOBluetoothObjectRef *') from 'int' [-Wint-conversion]
dd->inquiry = IOBluetoothDeviceInquiryCreateWithCallbackRefCon (&dd);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
osx/_osxbt.c:705:5: warning: implicit declaration of function 'IOBluetoothDeviceInquirySetCompleteCallback' is invalid in C99 [-Wimplicit-function-declaration]
IOBluetoothDeviceInquirySetCompleteCallback (dd->inquiry,
^
osx/_osxbt.c:717:5: warning: implicit declaration of function 'IOBluetoothDeviceInquiryStart' is invalid in C99 [-Wimplicit-function-declaration]
IOBluetoothDeviceInquiryStart (dd->inquiry);
^
osx/_osxbt.c:721:5: warning: implicit declaration of function 'IOBluetoothDeviceInquiryDelete' is invalid in C99 [-Wimplicit-function-declaration]
IOBluetoothDeviceInquiryDelete (dd->inquiry);
^
5 warnings and 2 errors generated.
error: command 'gcc' failed with exit status 1
PyBluez 仅适用于 Windows:
“PyBluez 适用于 GNU/Linux 和 Windows XP(Microsoft 和 Widcomm 蓝牙堆栈)。” -pybluez 主页
您似乎正在安装LightBlue 版本错误
Check dependencies
error: There is no SDK with the name or path '/Users/myname/Downloads/lightblue-0.4/src/mac/LightAquaBlue/macosx10.6'
它正在寻找 OSX 10.6 的文件。
下载并安装主发行版:https://github.com/postskolkovo/lightblue-0.4
如果出现错误:
Check dependencies
No architectures to compile for (ARCHS=$(NATIVE_ARCH_ACTUAL), VALID_ARCHS=i386 x86_64).
** INSTALL FAILED **
你必须打开 setup.py 并更改:
os.system("xcodebuild install -arch '$(NATIVE_ARCH_ACTUAL)' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
to:
os.system("xcodebuild install -arch 'i386' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
via 这次讨论
Edit
我实际上得到了一个ImportError: Bundle could not be loaded
当我尝试导入时在小牛队。
这似乎是 64 位计算机的修复方法:
os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
如果您遇到同样的事情,可能是必要的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)