[fpc-pascal] libusb header translation and OOP wrapper

Johann Glaser Johann.Glaser at gmx.at
Tue Sep 25 22:32:14 CEST 2012


Am Dienstag, den 25.09.2012, 21:57 +0200 schrieb Christo:
> On Sun, 2012-09-23 at 23:26 +0200, Johann Glaser wrote:
> > Hi!
> > 
> > Some time ago somebody asked about USB support. I've now finished the
> > libusb 1.0 header translation and object-oriented wrapper.
> Hi Hansi,
> I see that the imported functions in libusb.pas are declared with the
> cdecl calling convention. According to the libusb header this is so for
> all operating systems except windows which is apparently compiled using
> the stdcall calling convention.
> Any ideas on how to define the calling convention in the import unit so
> that it is either stdcall or cdecl depending on the target OS?

Thanks for pointing this out.

I only have access to Linux and don't know anything about Windows
development. So, I ask you (and anybody else) on the best and cleanest
way to make libusb.pas working in Linux and other OS.


More information about the fpc-pascal mailing list