From: Xiaofan C. <xia...@gm...> - 2010-08-21 01:08:02
|
On Sat, Aug 21, 2010 at 8:18 AM, Pete Batard <pb...@gm...> wrote: > I tested recompiling the test program against the last binary snapshot, > and I'm not experiencing any issue. I tried both shared, against the 32 > bit DLLs from the snaphost (both of them) and static against the static > multilib MinGW32 libusb-1.0.a from the snapshot, and in each case I got > a successful open. Below is some sample output for the static version. > > $ gcc -o lsusb lsusb.c -I. -L/e/dailies/2010.08.19/MinGW32/lib/ > -lusb-1.0 -lsetupapi -lole32 > Now I see the difference. I am taking the more "typical" way of using MinGW. I copy the libraries (.dll.a and .a) file to the MinGW lib directory and the include (.h) file to the MinGW include directory. In this more "typical" way, the default will be using dynamic linking. Only when you specifically use -l\full-path-to\libusb-1.0.a, ld will use static linking. But occasionally I forgot to put the dll.a file because your binary snapshots put the dll.a import library in the dll directory. I would suggest you put them to put in the lib directory. -- Xiaofan |