[fpc-pascal] USB Human Interface Devices

James Richters james at productionautomation.net
Mon Aug 5 04:40:36 CEST 2019


Hi Jean,  Thank you very much for your help getting this to work. I’ve been out of town on a business trip but I’m finally back now, and trying to follow all this.  I’ve been trying to follow along the conversation with Email but I did not have a very reliable internet connection. I did see a zip file you posted, but then it seems you made more changes since then, I’m not sure how to apply .diff files.  

 

Would it be possible to get an update zip file of the current files?  

 

I’m afraid a lot of this is just way over my head, I did not expect it to be anywhere near this complicated to get this to work, they python code I am trying to duplicate in my FPC application is so simple, but without access to the packages it uses, it’s turning out to be very complicated indeed..  ironically,  the unit I am trying to get to work is called EasyHID, but it seem to be anything but easy.

 

Here is the python code that I am trying to implement in my FPC program:

https://github.com/wolfmanjm/kivy-smoothie-host/blob/master/modules/hb04.py

 

 

James

 

From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Jean SUZINEAU
Sent: Sunday, August 4, 2019 12:39 PM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal] USB Human Interface Devices

 

Le 04/08/2019 à 14:07, Johann Glaser a écrit :



Hi James!
 
Am Donnerstag, den 01.08.2019, 22:45 -0400 schrieb James Richters:

I understand it better now, but I've been out of town and haven't
been able to work on it.   I'm not sure what is meant by installing
development packages though.. I see libusb at https://libusb.info/ I
see where to download that.. but I don't know about development
packages?  As for LibC,   I'm not really sure where to find the
proper package for that.  I found
http://gnuwin32.sourceforge.net/packages/libc.htm.bak but I'm not
sure that is right, and again not sure about development package for
that.  I would really appreciate links to the exact packages I will
need to use for Windows.

 
I'm sorry that I can't help you here with these Windows-specific
questions.
 
Could somebody else please help out here?

 

When you link to the dll, you can remove the {$LINKLIB c}.

But for now I haven't been able to make it work with a static link.

 

I added to project library search path in lazarus: E:\03_travail\libusb\libusb-1.0.22\MinGW64\static\ wich contains libusb-1.0.a
Then I changed {$LINKLIB usb-1.0} to {$LINKLIB libusb-1.0}, and removed {$LINKLIB c}
(I join the diff files)

In this way, libusb-1.0.a is found by the compiler, but the dependencies  of libusb-1.0.a on C runtime and several Windows system function are not fullfilled and you get these errors (I join them in file Compiler_output.txt)

Some of them like WaitForSingleObject are provided by Kernel32.dll but I don't know which lib from MinGW64 to use to provide __imp_WaitForSingleObject.  
Some others like atoi seem to be from the c runtime, but I haven't found  yet where are its libs (interesting link: https://stackoverflow.com/questions/52376724/mingw-w64-c-versions-support )

 

 

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190804/3ddcbdc6/attachment.html>


More information about the fpc-pascal mailing list