From: Pete B. <pb...@gm...> - 2010-08-22 22:43:54
|
On 2010.08.22 01:40, Xiaofan Chen wrote: > On Sun, Aug 22, 2010 at 8:36 AM, Xiaofan Chen<xia...@gm...> wrote: >> Actually you already have a different behavior between MS and MinGW >> in the snapshots. The examples of MinGW are using the dynamic >> linking. If you run them, you will get a application crash due to missing >> dll. > > Personally I think this might be better fixed. Simple thing is to copy > the MinGW dll inside the MinGW examples. I don't think that's very logical. People don't expect to find a DLL in examples. As to a different behaviour for the examples, well, the examples are just that, examples, or most specifically a sampler of what one can do with libusb. As such, it doesn't bother me much to have a set of examples that uses the DLL and another static. I could have stopped with providing only one set of samples (the static ones, because they're the most straightforward to use, and less likely to cause issues), but since both were available at no extra cost, I included both. If this becomes a contention point, considering that there's no good reason to have 2 set of samples really, I think I'll just drop the dynamically linked ones and keep static. As long as the snapshot includes the required files, and these files are logically organized, as I think they currently are right now, I don't really see much incentive to do more. As I explained, I don't really expect people who want to use both the static and shared library at the same time, to forget to copy all the files they need simply because they happen to be in two different directories. On the contrary, if I were to place both the import and static library in the same dir, I very much expect to see some complaints, which is why I'm not planning to do so. The reasoning is as straightforward as I could make it really. If you want to work with the libudb dll, then look into the "dll" dir. If you want to work with the static lib, then look into the "lib" dir (I could rename it to "static lib" if needed). If you want to work with both, then it is your responsibility to pick the files from both and copy them where required. Just like not everybody is expected to copy DLLs into system32 (but the people who do would obviously like us to go the extra mile for that), not everybody would copy the libraries in their system lib dir. Gotta draw the line as to where the responsibility of the library provider ends and the responsibility of the library user begins. You are supposed to know that you need to use an import lib if you work with the DLL, and therefore, you are supposed not to forget to update it, just like, if you want to have both a debug and release dll in system32, you are supposed to do the renaming as you see fit, not us. Regards, /Pete |