<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle23
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:windowtext'>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. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Would it be possible to get an update zip file of the current files? <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Here is the python code that I am trying to implement in my FPC program:<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><a href="https://github.com/wolfmanjm/kivy-smoothie-host/blob/master/modules/hb04.py">https://github.com/wolfmanjm/kivy-smoothie-host/blob/master/modules/hb04.py</a><o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='color:windowtext'>James<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> fpc-pascal <fpc-pascal-bounces@lists.freepascal.org> <b>On Behalf Of </b>Jean SUZINEAU<br><b>Sent:</b> Sunday, August 4, 2019 12:39 PM<br><b>To:</b> fpc-pascal@lists.freepascal.org<br><b>Subject:</b> Re: [fpc-pascal] USB Human Interface Devices<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Le 04/08/2019 à 14:07, Johann Glaser a écrit :<br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi James!<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Am Donnerstag, den 01.08.2019, 22:45 -0400 schrieb James Richters:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>I understand it better now, but I've been out of town and haven't<o:p></o:p></pre><pre>been able to work on it. I'm not sure what is meant by installing<o:p></o:p></pre><pre>development packages though.. I see libusb at <a href="https://libusb.info/">https://libusb.info/</a> I<o:p></o:p></pre><pre>see where to download that.. but I don't know about development<o:p></o:p></pre><pre>packages? As for LibC, I'm not really sure where to find the<o:p></o:p></pre><pre>proper package for that. I found<o:p></o:p></pre><pre><a href="http://gnuwin32.sourceforge.net/packages/libc.htm.bak">http://gnuwin32.sourceforge.net/packages/libc.htm.bak</a> but I'm not<o:p></o:p></pre><pre>sure that is right, and again not sure about development package for<o:p></o:p></pre><pre>that. I would really appreciate links to the exact packages I will<o:p></o:p></pre><pre>need to use for Windows.<o:p></o:p></pre></blockquote><pre><o:p> </o:p></pre><pre>I'm sorry that I can't help you here with these Windows-specific<o:p></o:p></pre><pre>questions.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Could somebody else please help out here?<o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>When you link to the dll, you can remove the {$LINKLIB c}.<o:p></o:p></p></div><p class=MsoNormal>But for now I haven't been able to make it work with a static link.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>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<br>Then I changed {$LINKLIB usb-1.0} to {$LINKLIB libusb-1.0}, and removed {$LINKLIB c}<br>(I join the diff files)<o:p></o:p></p><p>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)<o:p></o:p></p><p>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. <br>Some others like atoi seem to be from the c runtime, but I haven't found yet where are its libs (interesting link: <a href="https://stackoverflow.com/questions/52376724/mingw-w64-c-versions-support">https://stackoverflow.com/questions/52376724/mingw-w64-c-versions-support</a> )<o:p></o:p></p><p><o:p> </o:p></p><p><o:p> </o:p></p><p><o:p> </o:p></p><div><pre><o:p> </o:p></pre></div></div></body></html>