Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 64 Bit Build error #10

Open
h2oboi89 opened this issue Jan 17, 2014 · 3 comments
Open

Windows 7 64 Bit Build error #10

h2oboi89 opened this issue Jan 17, 2014 · 3 comments

Comments

@h2oboi89
Copy link

OS: Windows 7 64 Bit
Python: 3.3 (32 bit)
Cython: 0.19.2
Compiling using VS 2010 Express
Result of "python setup-windows.py build":

running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
building 'hid' extension
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python33\include -IC:\Python33\include /Tchid.c /Fobuild\temp.win32-3.3\Release\hid.obj
hid.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python33\include -IC:\Python33\include /Tchid-windows.c /Fobuild\temp.win32-3.3\Release\hid-windows.obj
hid-windows.c
hid-windows.c(205) : error C2275: 'GUID' : illegal use of this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\guiddef.h(27) : see 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 as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.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 this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.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 identifier
hid-windows.c(208) : error C2275: 'SP_DEVICE_INTERFACE_DETAIL_DATA_A' : illegal use of this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.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 identifier
hid-windows.c(209) : error C2275: 'HDEVINFO' : illegal use of this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.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 identifier
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 mismatch 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 identifier
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 identifier
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 identifier
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 identifier
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 identifier
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 identifier
hid-windows.c(256) : warning C4047: 'function' : 'PSP_DEVICE_INTERFACE_DETAIL_DATA_A' differs in levels of indirection from 'int'
hid-windows.c(256) : warning C4024: 'SetupDiGetDeviceInterfaceDetailA' : different types for formal and actual parameter 3
hid-windows.c(270) : error C2065: 'device_interface_detail_data' : undeclared identifier
hid-windows.c(270) : error C2223: left of '->DevicePath' must point to struct/union
hid-windows.c(271) : warning C4047: 'function' : 'LPCSTR' differs in levels of indirection from 'unsigned long'
hid-windows.c(271) : warning C4024: 'CreateFileA' : different types for formal and actual parameter 1
hid-windows.c(273) : warning C4047: 'function' : 'DWORD' differs in levels of indirection from 'void *'
hid-windows.c(273) : warning C4024: 'CreateFileA' : different types for formal and 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 and 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 as 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 type
hid-windows.c(295) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(295) : error C2224: left of '.ProductID' must have struct/union type
hid-windows.c(331) : error C2065: 'device_interface_detail_data' : undeclared identifier
hid-windows.c(331) : error C2223: left of '->DevicePath' must point to struct/union
hid-windows.c(363) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(363) : error C2224: left of '.VendorID' must have struct/union type
hid-windows.c(364) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(364) : error C2224: left of '.ProductID' must have struct/union type
hid-windows.c(367) : error C2065: 'attrib' : undeclared identifier
hid-windows.c(367) : error C2224: left of '.VersionNumber' must have struct/union type
hid-windows.c(377) : error C2065: 'device_interface_detail_data' : undeclared identifier
hid-windows.c(377) : warning C4022: 'free' : pointer mismatch for actual parameter 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 mismatch for actual parameter 1
hid-windows.c(536) : error C2275: 'OVERLAPPED' : illegal use of this type as an expression
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winbase.h(254) : 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) : 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'

@m-planck
Copy link

This is a special build for Mingw. From the readme:
".. with the C modification for windows from http://code.google.com/p/picusb/downloads/detail?name=hidapi_git_mingw_7e93a4e068825d227807.zip&can=2&q= so I could build it with mingw on windows."

Maybe we should switch to a more recent branch that is actively maintained
https://github.com/trezor/cython-hidapi

@gbishop
Copy link
Owner

gbishop commented Jan 19, 2014

I encourage you to switch to one of the actively maintained forks. I am not using this code now.

@h2oboi89
Copy link
Author

Thanks, got it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants