[fpc-pascal] USB Human Interface Devices

Johann Glaser Johann.Glaser at gmx.at
Thu Aug 1 23:08:47 CEST 2019


Hi!

Am Dienstag, den 30.07.2019, 19:57 -0400 schrieb James Richters:
> Thanks for removing the un-needed units.  I have been trying to
> compile as-is without any modifications.   I was not aware that this
> was dependent on LibC and Lib-USB.  I am not really clear on how to
> install these, maybe I just need to download the correct files and
> have them in the same directory I am trying to compile Pas-LibUSB
> from?
> I quite literally have a stock installation of FPC3.0.4RC1 and that
> is all.. nothing else, no Lazarus, no LibC or LibUSB anything
> development or otherwise.   So it seems the first step will be to
> install the prerequisite packages.  I'll see if I can figure that
> out.

Yes, pas-libusb is a Pascal wrapper for the Linux library libusb. That
library itself further depends on libc. Thats why you have to install
them, and including their respective development packages.

Was the message of Jean helpful for you?

Thanks
  Hansi

> -----Original Message-----
> From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf
> Of Johann Glaser
> Sent: Tuesday, July 30, 2019 4:54 PM
> To: fpc-pascal at lists.freepascal.org
> Subject: Re: [fpc-pascal] USB Human Interface Devices
>
> Hi James!
>
> Am Dienstag, den 30.07.2019, 13:52 -0400 schrieb James Richters:
> > > > Due to my lack of understanding of Windows, I've not yet taken
> > > > over his changes, because I wanted to wait for confirmation
> > > > from
> > > > other users. So if James had some feedback, I'd appreciate it
> > > > greatly.
> >
> > I'm trying to get this to work on windows,  I'm having a lot of
> > units
> > not found errors when I try to compile anything at all.. I'm not
> > sure
> > what I need here to get the examples to work.    Here is a list of
> > units I can't find when I try to compile with FPC 3.0.4RC1 on
> > Windows:
> >
> > ezusb.pas(42,15) Fatal: Can't find unit Errors used by EZUSB I have
> > no
> > idea what Unit Errors is or what it might be for.
>
> Thanks for pointing this out. This is a Unix unit, but it is
> obviously not used in Ezusb. I've removed it now.
>
> > libusb.pas(1350) Warning: Library c.dll not found, Linking may fail
> > !                                                ■
> > libusb.pas(1350) Warning: Library usb-1.0 not found, Linking may
> > fail !
> > I'm not really following where c.dll and usb1.0 are supposed to
> > come
> > from
>
> It seems you didn't install the development stuff for libc and lib-
> usb?
> At least in Linux, I always have to install these additionally (e.g.,
> libusb-1.0-0-dev) to the "productive" libraries (e.g., libusb-1.0-0).
>
> > usb.pas(31,22) Fatal: Can't find unit Baseunix used by USB
>
> Same as above for Errors. However, this file is unused.
>
> > mydevice.pas(27,20) Fatal: Can't find unit BaseUnix used by
> > MyDevice I
> > have no idea what BaseUnix does or if I can do something windows
> > compatible instead somehow.
>
> Same as above for Errors.
>
> > Test1Library.pas:
> > ║ (0) Error: Import library not found for c ║ (0) Error: Import
> > library not found for usb-1.0
>
> This seems to be again a problem because of the missing development
> stuff for libc anc libusb.
>
> > To be honest this is quite a bit over my head.  I'm trying to
> > follow
> > https://github.com/hansiglaser/pas-libusb/issues/4 but I'm just
> > lost.
>
> I would recommend, first to just compile the pristine pas-libusb
> without any hints from that Github issue. Only if you get the same
> errors, please try them and let me know.
>
> As stated above, I've now removed all references to the units Errors
> and Baseunix. Please "git pull" to the newest state on Github and
> compile again. If you still face problems, please don't hesitate to
> ask again.
>
> Thanks
>   Hansi
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list