On 9/7/2010 22:07, Ozkan Sezer wrote:
> On Tue, Sep 7, 2010 at 4:18 PM, JonY<[email protected]>  wrote:
>> On 9/7/2010 21:01, Xiaofan Chen wrote:
>>> 2010/9/7 Xiaofan Chen<[email protected]>:
>>>> Latest libusb-win32 svn (SVN 343)
>>>> http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/branches/libusb-testing/
>>>>
>>>> Latest TDM64, 64bit build, under Windows 7 32bit. The other binary 
>>>> download does
>>>> not seem to have the test DDK headers integrated.
>>>>
>>>> Most of the things are okay. But the 64bit driver building is quite
>>>> messy. We can change
>>>> the codes to accommodate MinGW-w64, within a reasonable limit. MinGW.org
>>>> 32bit compiler builds the 32bit driver with no problems.
>>>>
>>>> mc...@mcuee-pc-win7
>>>> /d/work/libusb-win32/mingw64/libusb-win32/branches/libusb-testing
>>>> $ make dll filter test testwin
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/usb.c -o usb.2.o  -I./src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/error.c -o error.2.o  -I./src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/descriptors.c -o descriptors.2.o  -I./src 
>>>> -I./src/driver -
>>>> I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/windows.c -o windows.2.o  -I./src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/install.c -o install.2.o  -I./src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -c ./src/registry.c -o registry.2.o  -I./src -I./src/driver 
>>>> -I.
>>>> ./src/registry.c: In function 'usb_registry_get_mz_value':
>>>> ./src/registry.c:825:4: warning: pointer targets in passing argument 5 of 
>>>> 'RegQu
>>>> eryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_set_mz_value':
>>>> ./src/registry.c:882:5: warning: pointer targets in passing argument 5 of 
>>>> 'RegSe
>>>> tValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:193:25: note: expected 'const BYTE *' but argument 
>>>> is of
>>>> type 'char *'
>>>> ./src/registry.c:890:5: warning: pointer targets in passing argument 5 of 
>>>> 'RegSe
>>>> tValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:193:25: note: expected 'const BYTE *' but argument 
>>>> is of
>>>> type 'char *'
>>>> ./src/registry.c: In function 'usb_registry_get_all_class_keys':
>>>> ./src/registry.c:1375:7: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_lookup_class_keys_by_name':
>>>> ./src/registry.c:1438:6: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_get_class_filter_keys':
>>>> ./src/registry.c:1580:2: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c:1586:2: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> windres  -I./src ./src/resource.rc -o resource.2.o
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"libusb0-dll\" 
>>>> -DTARGET
>>>> TYPE=DYNLINK -o libusb0.dll -I./src  usb.2.o error.2.o descriptors.2.o 
>>>> windows.2
>>>> .o install.2.o registry.2.o resource.2.o libusb0.def -s -mdll -mno-cygwin 
>>>> -Wl,--
>>>> kill-at -Wl,--out-implib,libusb.a -Wl,--enable-stdcall-fixup -L. 
>>>> -lcfgmgr32 -lse
>>>> tupapi -lgdi32
>>>> Creating library file: libusb.a
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"install-filter\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/install_filter.c -o 
>>>> install_fi
>>>> lter.1.o  -I./src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"install-filter\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/error.c -o error.1.o  
>>>> -I./src
>>>> -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"install-filter\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/install.c -o install.1.o 
>>>>  -I./
>>>> src -I./src/driver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"install-filter\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/registry.c -o 
>>>> registry.1.o  -I
>>>> ./src -I./src/driver -I.
>>>> ./src/registry.c: In function 'usb_registry_get_mz_value':
>>>> ./src/registry.c:825:4: warning: pointer targets in passing argument 5 of 
>>>> 'RegQu
>>>> eryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_set_mz_value':
>>>> ./src/registry.c:882:5: warning: pointer targets in passing argument 5 of 
>>>> 'RegSe
>>>> tValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:193:25: note: expected 'const BYTE *' but argument 
>>>> is of
>>>> type 'char *'
>>>> ./src/registry.c:890:5: warning: pointer targets in passing argument 5 of 
>>>> 'RegSe
>>>> tValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:193:25: note: expected 'const BYTE *' but argument 
>>>> is of
>>>> type 'char *'
>>>> ./src/registry.c: In function 'usb_registry_get_all_class_keys':
>>>> ./src/registry.c:1375:7: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_lookup_class_keys_by_name':
>>>> ./src/registry.c:1438:6: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c: In function 'usb_registry_get_class_filter_keys':
>>>> ./src/registry.c:1580:2: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> ./src/registry.c:1586:2: warning: pointer targets in passing argument 5 of 
>>>> 'RegQ
>>>> ueryValueExA' differ in signedness
>>>> d:\tdm\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
>>>> ngw32/include/winreg.h:182:25: note: expected 'LPBYTE' but argument is of 
>>>> type '
>>>> char *'
>>>> windres  -I./src ./src/install_filter_rc.rc -o install_filter_rc.1.o
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"install-filter\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -o install-filter.exe -I./src  
>>>> install_
>>>> filter.1.o error.1.o install.1.o registry.1.o install_filter_rc.1.o -s 
>>>> -mno-cygw
>>>> in -L. -lgdi32 -luser32 -lcfgmgr32 -lsetupapi
>>>> gcc -c ./tests/testlibusb.c -o testlibusb.3.o -O2 -Wall -mno-cygwin 
>>>> -DWINVER=0x5
>>>> 00  -DLOG_APPNAME=\"testlibusb\" -DTARGETTYPE=PROGRAMconsole  -I./src 
>>>> -I./src/dr
>>>> iver -I.
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"testlibusb\" 
>>>> -DTARGETT
>>>> YPE=PROGRAMconsole -o testlibusb.exe -I./src  testlibusb.3.o -s 
>>>> -mno-cygwin -L.
>>>> -lusb -lgdi32 -luser32 -lcfgmgr32 -lsetupapi -lcomctl32
>>>> gcc -c ./tests/testlibusb_win.c -o testlibusb_win.4.o -O2 -Wall 
>>>> -mno-cygwin -DWI
>>>> NVER=0x500  -DLOG_APPNAME=\"testlibusb-win\" -DTARGETTYPE=PROGRAMwindows  
>>>> -I./sr
>>>> c -I./src/driver -I.
>>>> windres  -I./src ./tests/testlibusb_win_rc.rc -o testlibusb_win_rc.4.o
>>>> gcc -O2 -Wall -mno-cygwin -DWINVER=0x500  -DLOG_APPNAME=\"testlibusb-win\" 
>>>> -DTAR
>>>> GETTYPE=PROGRAMwindows -o testlibusb-win.exe -I./src  testlibusb_win.4.o 
>>>> testlib
>>>> usb_win_rc.4.o -s -mno-cygwin -L. -lusb -lkernel32 -lgdi32 -luser32 
>>>> -lnewdev -ls
>>>> etupapi -lcomctl32 -lole32 -mwindows
>>>>
>>>> The driver building is quite messy.
>>>> mc...@mcuee-pc-win7
>>>> /d/work/libusb-win32/mingw64/libusb-win32/branches/libusb-testing
>>>> $ make -i driver>makedriver.log 2>&1
>>>>
>>>> The log is quite long.
>>>
>>> The size of the post is over the limit.
>>> So the log is zipped and send as a attachment.
>>>
>>> Please take a look at the log and comment on the changes required
>>> on our end and on the end of MinGW-w64. Thanks in advance.
>>>
>>>
>>
>> Hi,
>>
>> I assume this is a 32bit build with mingw-w64.
>>
>> -mno-cygwin option is unsupported at all on win64, and soon to be
>> removed even on 32bit target.
>>
>> -DWINVER=0x500 does not work on mingw-w64, mingw-w64 assumes
>> _WIN32_WINNT of at least 0x0501 or XP.
>>
>> Ozkan, what do you make of the winnt.h/ntdef.h conflict?
>
> What is the conflict?
>

See the OP's zip attachment. More specifically, do you know how to avoid 
the conflict, or any mistakes that cause the conflicts?

I have not used the ntddk for anything important, so I do not know about 
handling the conflicts.


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to