- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在构建 Cython 时遇到了很多问题在我的 Windows 虚拟机中。我在 OS X 中没有遇到任何问题,但它真的开始让我感到沮丧......
>>setup.py 全新安装
running clean
removing 'build\temp.win-amd64-2.7' (and everything under it)
removing 'build'
running install
running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
building 'hid' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tchid.c /Fobuild\temp.win-amd64-2.7\Release\hid.obj
hid.c
c:\python27\include\pymath.h(22) : warning C4273: 'round' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(516) : see previous definition of 'round'
hid.c(801) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tchid-libus
b.c /Fobuild\temp.win-amd64-2.7\Release\hid-libusb.obj
hid-libusb.c
hid-libusb.c(52) : fatal error C1083: Cannot open include file: 'iconv.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
我在计算机上找不到任何名为“iconv.h”的 header 。如果这不包含在 VC++ 中2013年了,我怎样才能让它发挥作用?
使用>>setup-windows.py clean install
后:
running clean
removing 'build\temp.win-amd64-2.7' (and everything under it)
removing 'build'
running install
running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
building 'hid' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tchid.c /Fob
uild\temp.win-amd64-2.7\Release\hid.obj
hid.c
hid.c(801) : warning C4267: '=' : conversion from 'size_t' to 'int', possible lo
ss of data
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tchid-window
s.c /Fobuild\temp.win-amd64-2.7\Release\hid-windows.obj
hid-windows.c
hid-windows.c(205) : error C2275: 'GUID' : illegal use of this type as an expres
sion
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\guiddef.h(27) : s
ee declaration of 'GUID'
hid-windows.c(205) : error C2146: syntax error : missing ';' before identifier '
InterfaceClassGuid'
hid-windows.c(205) : error C2065: 'InterfaceClassGuid' : undeclared identifier
hid-windows.c(205) : error C2059: syntax error : '{'
hid-windows.c(206) : error C2275: 'SP_DEVINFO_DATA' : illegal use of this type a
s an expression
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\setupapi.h(708) :
see declaration of 'SP_DEVINFO_DATA'
hid-windows.c(206) : error C2146: syntax error : missing ';' before identifier '
devinfo_data'
hid-windows.c(206) : error C2065: 'devinfo_data' : undeclared identifier
hid-windows.c(207) : error C2275: 'SP_DEVICE_INTERFACE_DATA' : illegal use of th
is type as an expression
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\setupapi.h(720) :
see declaration of 'SP_DEVICE_INTERFACE_DATA'
hid-windows.c(207) : error C2146: syntax error : missing ';' before identifier '
device_interface_data'
hid-windows.c(207) : error C2065: 'device_interface_data' : undeclared identifie
r
hid-windows.c(208) : error C2275: 'SP_DEVICE_INTERFACE_DETAIL_DATA_A' : illegal
use of this type as an expression
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\setupapi.h(742) :
see declaration of 'SP_DEVICE_INTERFACE_DETAIL_DATA_A'
hid-windows.c(208) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(209) : error C2275: 'HDEVINFO' : illegal use of this type as an ex
pression
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\setupapi.h(697) :
see declaration of 'HDEVINFO'
hid-windows.c(209) : error C2146: syntax error : missing ';' before identifier '
device_info_set'
hid-windows.c(209) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(209) : warning C4047: '=' : 'int' differs in levels of indirection
from 'HANDLE'
hid-windows.c(212) : error C2065: 'devinfo_data' : undeclared identifier
hid-windows.c(212) : error C2224: left of '.cbSize' must have struct/union type
hid-windows.c(213) : error C2065: 'device_interface_data' : undeclared identifie
r
hid-windows.c(213) : error C2224: left of '.cbSize' must have struct/union type
hid-windows.c(217) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(217) : error C2065: 'InterfaceClassGuid' : undeclared identifier
hid-windows.c(217) : warning C4133: 'function' : incompatible types - from 'int
*' to 'const GUID *'
hid-windows.c(217) : warning C4047: '=' : 'int' differs in levels of indirection
from 'HDEVINFO'
hid-windows.c(220) : error C2143: syntax error : missing ';' before 'type'
hid-windows.c(225) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(225) : warning C4022: 'SetupDiEnumDeviceInterfaces' : pointer mism
atch for actual parameter 1
hid-windows.c(227) : error C2065: 'InterfaceClassGuid' : undeclared identifier
hid-windows.c(227) : warning C4133: 'function' : incompatible types - from 'int
*' to 'const GUID *'
hid-windows.c(228) : error C2065: 'device_index' : undeclared identifier
hid-windows.c(229) : error C2065: 'device_interface_data' : undeclared identifie
r
hid-windows.c(229) : warning C4133: 'function' : incompatible types - from 'int
*' to 'PSP_DEVICE_INTERFACE_DATA'
hid-windows.c(240) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(240) : warning C4022: 'SetupDiGetDeviceInterfaceDetailA' : pointer
mismatch for actual parameter 1
hid-windows.c(241) : error C2065: 'device_interface_data' : undeclared identifie
r
hid-windows.c(241) : warning C4133: 'function' : incompatible types - from 'int
*' to 'PSP_DEVICE_INTERFACE_DATA'
hid-windows.c(248) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(248) : warning C4047: '=' : 'int' differs in levels of indirection
from 'SP_DEVICE_INTERFACE_DETAIL_DATA_A *'
hid-windows.c(249) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(249) : error C2223: left of '->cbSize' must point to struct/union
hid-windows.c(254) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(254) : warning C4022: 'SetupDiGetDeviceInterfaceDetailA' : pointer
mismatch for actual parameter 1
hid-windows.c(255) : error C2065: 'device_interface_data' : undeclared identifie
r
hid-windows.c(255) : warning C4133: 'function' : incompatible types - from 'int
*' to 'PSP_DEVICE_INTERFACE_DATA'
hid-windows.c(256) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(256) : warning C4047: 'function' : 'PSP_DEVICE_INTERFACE_DETAIL_DA
TA_A' differs in levels of indirection from 'int'
hid-windows.c(256) : warning C4024: 'SetupDiGetDeviceInterfaceDetailA' : differe
nt types for formal and actual parameter 3
hid-windows.c(270) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(270) : error C2223: left of '->DevicePath' must point to struct/un
ion
hid-windows.c(271) : warning C4047: 'function' : 'LPCSTR' differs in levels of i
ndirection from 'unsigned long'
hid-windows.c(271) : warning C4024: 'CreateFileA' : different types for formal a
nd actual parameter 1
hid-windows.c(273) : warning C4047: 'function' : 'DWORD' differs in levels of in
direction from 'void *'
hid-windows.c(273) : warning C4024: 'CreateFileA' : different types for formal a
nd actual parameter 3
hid-windows.c(274) : warning C4047: 'function' : 'LPSECURITY_ATTRIBUTES' differs
in levels of indirection from 'int'
hid-windows.c(274) : warning C4024: 'CreateFileA' : different types for formal a
nd actual parameter 4
hid-windows.c(276) : error C2198: 'CreateFileA' : too few arguments for call
hid-windows.c(287) : error C2275: 'HIDD_ATTRIBUTES' : illegal use of this type a
s an expression
hid-windows.c(79) : see declaration of 'HIDD_ATTRIBUTES'
hid-windows.c(287) : error C2146: syntax error : missing ';' before identifier '
attrib'
hid-windows.c(287) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(288) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(288) : error C2224: left of '.Size' must have struct/union type
hid-windows.c(289) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(289) : warning C4133: 'function' : incompatible types - from 'int
*' to 'PHIDD_ATTRIBUTES'
hid-windows.c(295) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(295) : error C2224: left of '.VendorID' must have struct/union typ
e
hid-windows.c(295) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(295) : error C2224: left of '.ProductID' must have struct/union ty
pe
hid-windows.c(331) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(331) : error C2223: left of '->DevicePath' must point to struct/un
ion
hid-windows.c(363) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(363) : error C2224: left of '.VendorID' must have struct/union typ
e
hid-windows.c(364) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(364) : error C2224: left of '.ProductID' must have struct/union ty
pe
hid-windows.c(367) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(367) : error C2224: left of '.VersionNumber' must have struct/unio
n type
hid-windows.c(377) : error C2065: 'device_interface_detail_data' : undeclared id
entifier
hid-windows.c(377) : warning C4022: 'free' : pointer mismatch for actual paramet
er 1
hid-windows.c(379) : error C2065: 'device_index' : undeclared identifier
hid-windows.c(384) : error C2065: 'device_info_set' : undeclared identifier
hid-windows.c(384) : warning C4022: 'SetupDiDestroyDeviceInfoList' : pointer mis
match for actual parameter 1
hid-windows.c(505) : warning C4267: 'function' : conversion from 'size_t' to 'DW
ORD', possible loss of data
hid-windows.c(536) : error C2275: 'OVERLAPPED' : illegal use of this type as an
expression
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include\winbase.h(250) :
see declaration of 'OVERLAPPED'
hid-windows.c(536) : error C2146: syntax error : missing ';' before identifier '
ol'
hid-windows.c(536) : error C2065: 'ol' : undeclared identifier
hid-windows.c(537) : error C2065: 'ol' : undeclared identifier
hid-windows.c(537) : error C2065: 'ol' : undeclared identifier
hid-windows.c(538) : error C2065: 'ol' : undeclared identifier
hid-windows.c(538) : error C2224: left of '.hEvent' must have struct/union type
hid-windows.c(544) : warning C4267: 'function' : conversion from 'size_t' to 'DW
ORD', possible loss of data
hid-windows.c(544) : error C2065: 'ol' : undeclared identifier
hid-windows.c(544) : warning C4133: 'function' : incompatible types - from 'int
*' to 'LPOVERLAPPED'
hid-windows.c(571) : error C2065: 'ol' : undeclared identifier
hid-windows.c(571) : warning C4133: 'function' : incompatible types - from 'int
*' to 'LPOVERLAPPED'
hid-windows.c(603) : warning C4267: 'function' : conversion from 'size_t' to 'UL
ONG', possible loss of data
hid-windows.c(609) : warning C4267: 'return' : conversion from 'size_t' to 'int'
, possible loss of data
hid-windows.c(631) : warning C4267: 'function' : conversion from 'size_t' to 'DW
ORD', possible loss of data
hid-windows.c(632) : warning C4267: 'function' : conversion from 'size_t' to 'DW
ORD', possible loss of data
hid-windows.c(668) : warning C4267: 'function' : conversion from 'size_t' to 'UL
ONG', possible loss of data
hid-windows.c(681) : warning C4267: 'function' : conversion from 'size_t' to 'UL
ONG', possible loss of data
hid-windows.c(694) : warning C4267: 'function' : conversion from 'size_t' to 'UL
ONG', possible loss of data
hid-windows.c(707) : warning C4267: 'function' : conversion from 'size_t' to 'UL
ONG', possible loss of data
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64
\cl.exe"' failed with exit status 2
最佳答案
关于python - 构建 Cython-HIDapi Python 2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20876393/
我想从 OS X 上的 Python 的 USB HID 扫描仪读取一个字符串。下面的例子是我的起点,我已经能够为我的扫描仪定制代码:我已经能够执行命令:h.open () 成功并打印出制造商和产品字
我是 Python hidapi 的新手,尽管我使用过它之前基于的 C 版本。 Python 库非常不同,我无法从提供的一个示例中弄清楚如何使用它。有谁知道这个库有什么好的文档吗? 如果您要查找特定问
关于 HIDAPI 的高级问题,如果有人对此有任何经验 - http://www.signal11.us/oss/hidapi/ - visual studio 解决方案是用 C++ 编写的,我有一个
我将整个 hidapi-0.7.0 下载 ( https://github.com/downloads/signal11/hidapi/hidapi-0.7.0.zip ) 解压缩到我的项目目录中,然
我正在尝试使用 HIDAPI 库来帮助构建一些适用于 mac 的 hid 驱动程序。按照自述文件,我被告知进入 mac 目录并运行 make 命令。不幸的是,这并没有做太多,而且我在自述文件中没有看到
我正在使用一个设备(wiimote),它通过数据管道接收命令,并且只接受与命令本身一样长的命令数据包。例如,它将接受: 0x11 0x10 但它不会接受: 0x11 0x10 0x00 0x00 0x
我正在尝试使用 python 与通用 HID 设备进行通信。 我读到用 C 编写的 HIDAPI 库在简单稳定的跨平台 HID 通信方面胜过 libusb1.0。但是,从来没有人费心展示如何从 pyt
设备/操作系统:Jetson Nano/Ubuntu 18.04 python 3 有一个蓝牙加密狗连接。 如 UI 所示,Joy-Con 已连接: 以及当我这样做时: $ hcitool con C
上下文:Windows 10 尝试安装和测试 python hid按照说明: pip install hid 导入模块的测试失败: Python 3.8.3 (tags/v3.8.3:6f8c832
我使用 Visual Studios 在 Windows 上构建 hidapi。构建生成了一个“hidapi.lib”文件。现在我尝试使用 Eclipse IDE 编写 C 代码,并通过将其名称更改为
我正在尝试为 HIDAPI 库创建一个剥离的 .so 文件。我从 https://github.com/libusb/hidapi.git 克隆了库.我遵循了在 Linux 系统上构建的步骤: ./b
我在构建 Cython 时遇到了很多问题在我的 Windows 虚拟机中。我在 OS X 中没有遇到任何问题,但它真的开始让我感到沮丧...... >>setup.py 全新安装 running cl
我正在尝试编译 hidapi在 ubuntu 14.04 上与 node-hid 一起使用.当 hidapi 使用 hidraw 作为 this issue 时,由于某种原因,Node-hid 看不到
为 USB 鼠标编写一些 C 代码。 更具体地说,将配置和信息写入鼠标,如轮询、灵敏度、按钮操作、颜色(灯光)、触觉改变、OLED 等。 开始于 this old article其中,libhid 优
我正在尝试将 Visual Studio 2015 上的 hidapi 库用于 C++ 控制台应用程序。 我已将 hidapi.h 作为头文件包含在内,但似乎无法弄清楚如何链接 dll。我搜索了这个站
我在 Linux 上有一个应用程序,它使用 hidapi 读取复杂设备的数据(由 Qt5.3 创建)。该设备有多个接口(interface) HID,一种是“鼠标”,一种是“键盘”。在 Linux 上
我正在使用 python 在 OSX El Capitan 上打开 hid/hidapi(无论哪种方式错误都是相同的)连接。但是,它给了我以下错误堆栈跟踪: Traceback (most rece
OSX High-Sierra:已成功为 python 2.7 安装 HIDAPI。今天安装了 Python3: Users-MacBook-Air:~ user$ python3 --version
我是一名优秀的程序员,十分优秀!