Where did you get the winusb.h file (link)?
Post the entire build log text not just an extract.
Post a complete code example that yields this result.
The line you posted appears to use macros, so its semantics would depend upon the definition of those macros. The probability is that one of both of them is not defined. Note that C_ASSERT is a macro defined by including <windows.h>, you may need to include that ahead of <winusb.h>
Beyond that, there is nothing that guarantees that Microsoft's driver kit will work with MinGW/GCC even if you get past this hurdle. You might find that an open souurce USB library will suit your needs without having to write kernel level code. For example: http://libusb-win32.sourceforge.net
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello..
I'm trying to use the winusb API, but when I include the header winusb.h, I get these two compiler errors:
expected constructor, destructor, or type conversion before '(' token
expected
,' or;' before '(' tokenThe errors refer to this line in usb200.h:
C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
The header files are part of Microsofts driver kit package and I havn't changed anything in them.
More context required:
Where did you get the winusb.h file (link)?
Post the entire build log text not just an extract.
Post a complete code example that yields this result.
The line you posted appears to use macros, so its semantics would depend upon the definition of those macros. The probability is that one of both of them is not defined. Note that C_ASSERT is a macro defined by including <windows.h>, you may need to include that ahead of <winusb.h>
Beyond that, there is nothing that guarantees that Microsoft's driver kit will work with MinGW/GCC even if you get past this hurdle. You might find that an open souurce USB library will suit your needs without having to write kernel level code. For example: http://libusb-win32.sourceforge.net
Clifford