On Sat, Sep 11, 2010 at 3:20 PM, Xiaofan Chen <[email protected]> wrote:
> On Sat, Sep 11, 2010 at 4:00 PM, Ozkan Sezer <[email protected]> wrote:
>> Oki dokie, msg received. Lets try with this new one (changed the
>> static inline to extern __inline __attribute__((__gnu_inline__))
>
> BTW, could you provide similar file for x86? Thanks.

I would, but see below

>
> I changed the Makefile to build the 32bit driver with TDM64 32bit compiler,
> I have the following errors now.
>
> Also if the @8 is not good to have, shall I just remove it?

You need the @8 _and_ the leading underscore for x86
So you need adjusting your Makefile and libusb0_drv.def
for two different builds.

>
> gcc -c ./src/error.c -o error.o -m32 -O2 -Wall -DWINVER=0x500  
> -DLOG_APPNAME=\"l
> ibusb0-sys\" -DTARGETTYPE=DRIVER  -I./src -I./src/driver -I./src/ddk -I.
> In file included from ./src/ddk/ntddk.h:38:0,
>                 from ./src/error.c:28:
> ./src/ddk/wdm.h:6700:36: warning: declaration does not declare anything
> windres  -I./src  --target=pe-i386 ./src/driver/libusb_driver_rc.rc -o 
> libusb_dr
> iver_rc.o
> gcc -static -o libusb0.sys abort_endpoint.o claim_interface.o clear_feature.o 
> di
> spatch.o get_configuration.o get_descriptor.o get_interface.o get_status.o 
> ioctl
> .o libusb_driver.o pnp.o release_interface.o reset_device.o reset_endpoint.o 
> set
> _configuration.o set_descriptor.o set_feature.o set_interface.o transfer.o 
> vendo
> r_request.o power.o driver_registry.o error.o libusb_driver_rc.o  
> libusb0_drv.de
> f -s -m32 -shared -Wl,--entry,driveren...@8 -nostartfiles -nostdlib -L. 
> -lusbd -
> lntoskrnl -lhal
> d:/tdm/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mi
> ngw32/bin/ld.exe: warning: cannot find entry symbol driveren...@8; defaulting 
> to
>  0000000068641000

This: as I said above

> libusb_driver.o:libusb_driver.c:(.text+0x696): undefined reference to 
> `_Interloc
> kedIncrement'
> libusb_driver.o:libusb_driver.c:(.text+0x6b4): undefined reference to 
> `_Interloc
> kedDecrement'
> libusb_driver.o:libusb_driver.c:(.text+0x701): undefined reference to 
> `_Interloc
> kedDecrement'
> set_configuration.o:set_configuration.c:(.text+0x1c8): undefined reference to 
> `U
> sbd_createconfigurationreques...@8'
> transfer.o:transfer.c:(.text+0x14a): undefined reference to 
> `_InterlockedIncreme
> nt'
> transfer.o:transfer.c:(.text+0x17f): undefined reference to 
> `_InterlockedDecreme
> nt'
> transfer.o:transfer.c:(.text+0x1b1): undefined reference to 
> `_InterlockedDecreme
> nt'
> transfer.o:transfer.c:(.text+0x2fb): undefined reference to 
> `_InterlockedDecreme
> nt'
> transfer.o:transfer.c:(.text+0x413): undefined reference to 
> `_InterlockedExchang
> e'
> transfer.o:transfer.c:(.text+0x4d9): undefined reference to 
> `_InterlockedExchang
> e'
> transfer.o:transfer.c:(.text+0x62a): undefined reference to 
> `_InterlockedIncreme
> nt'
> transfer.o:transfer.c:(.text+0xd16): undefined reference to 
> `_InterlockedExchang
> e'
> transfer.o:transfer.c:(.text+0xde7): undefined reference to 
> `_InterlockedIncreme
> nt'

With these, I am baffled:  These were supposed to be imported from ntoskrnl.exe
Our lib32/ntoskrnl.def has the proper entries, so why are they not?
Kai, any insights?

(Of course we can provide inlines for these but that's not the point,
and the msvc
builds are importing them from ntoskrnl.exe, too.)

> collect2: ld returned 1 exit status
> make: *** [libusb0.sys] Error 1
>
>
> --
> Xiaofan
>

--
Ozkan

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to