On Tue, Sep 7, 2010 at 6:02 PM, Xiaofan Chen <xiaof...@gmail.com> wrote: > On Tue, Sep 7, 2010 at 10:44 PM, Xiaofan Chen <xiaof...@gmail.com> wrote: >> On Tue, Sep 7, 2010 at 9:58 PM, JonY <jo...@users.sourceforge.net> wrote: >>> Please do not use the ddk from mingw.org, use the ones from svn instead. >>> >>> The ddk headers in use by mingw-w64 is from ReactOS, you could say they are >>> more complete. >> >> I am not using the ddk from mingw.org. I am using the TDM64 version. >> I believe the ddk inside TDM64 is from the svn version. > > Ok, I changed the file libusb_driver.h and error.c. > > libusb_driver.h > #ifdef __GNUC__ > #if defined(_WIN64) > #include <usb100.h> > #include <usbdi.h> > #include <ddk/ntddk.h>
The order here is wrong. It should be #include <ddk/ntddk.h> #include <usb100.h> #include <usbdi.h> With this ntdef.h will be picked properly and winnt.h won't ever get in the way. Since you specifically use ddk/ please find a way of adding ddk to the include path. (maybe making a copy of the ddk directory under c:\mingw64 or whereevr the toolchain is, and then adding a proper -I to the gcc command.) > #include "usbdlib_gcc.h" > #else > #include <ddk/usb100.h> > #include <ddk/usbdi.h> > #include <ddk/winddk.h> > #include "usbdlib_gcc.h" > #else > #include <wdm.h> > #include "usbdi.h" > #include "usbdlib.h" > #endif > > error.c > #if IS_DRIVER > #ifdef __GNUC__ > #if defined(_WIN64) > #define OBJ_KERNEL_HANDLE 0x00000200L > #include <usb100.h> > #include <usbdi.h> > #include <ddk/ntddk.h> > #include "usbdlib_gcc.h" > #else > #define OBJ_KERNEL_HANDLE 0x00000200L > #include <ddk/usb100.h> > #include <ddk/usbdi.h> > #include <ddk/winddk.h> > #include "usbdlib_gcc.h" > #else > #include <ntddk.h> > #endif > #else > #include <windows.h> > #endif > > Then the things goes further. > > Enclosed is the zipped log file, using TMD64, under Windows 7 64bit. > > -- > Xiaofan > -- Ozkan ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public