Tim,
My real problem was I have never had a need to use or build dll. Consequently I
just blindly copied sample codes until I run into trouble and than I needed to
have some "inside" knowledge.
Since I am happy that my app works I still need to build a test app using dll
to get a grasp on what you have told me.
I really appreciate your help. Thanks.
Vaclav
________________________________
From: Tim Roberts <t...@probo.com>
To: "libusbx-devel@lists.sourceforge.net" <libusbx-devel@lists.sourceforge.net>
Sent: Tuesday, August 6, 2013 10:51 PM
Subject: Re: [Libusbx-devel] LitteWire libusb library help
On Aug 6, 2013, at 6:02 PM, Vaclav <vaclav_...@yahoo.com> wrote:
>
>The basic misunderstanding is that I
really do not know how does the XP libusb0.dll gets into play.
>I can have the resulting static library
execute the usb_init(), but all I can do is to load the libsub0.dll.
Are you familiar with the difference between a static library and a dynamic
library? When you build a Windows library, you have two choices. You can put
all of the object code into a single .lib. That's a static library. Or, you
can put all of the object code into a DLL. However, when you build a DLL, you
also have a .lib, called an "import library". The import library doesn't
contain any code. For each entry point in the DLL, it has a stub that
identifies the name of the DLL and the name of the entry point that should be
called. This is different than the situation on Linux, where a single shared
object can be used both at link time and at run time.
I suspect that's where your confusion lies. You are linking with libusb0.lib,
but all that does is embed pointers to libusb0.dll. When you run the final
linked executable, you also need libusb0.dll.
I have no clue where did the
libusb0.dll came from. And the original author used “libusb0.1”
and that is all I know about it.
libusb0.1 is just a generic name for that version of the library. The
user-mode code for libusb 0.1 happens to be stored in a DLL called
"libusb0.dll". The contents of libusb0.dll are all of the routines documented
as being part of libusb 0.1.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel