<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 08/08/2019 à 12:07, James Richters a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:06d401d54dd1$111685d0$33439170$@productionautomation.net">
<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;}
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.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle21
{mso-style-type:personal-reply;
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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext">Is the
static linking issue just with Windows, and it works on
Linux, or it isn’t working with FPC at all on either?<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>
</div>
</blockquote>
<p>It seems that right out of the box pas-libusb uses static linking
for me.<br>
It works right out of the box on Ubuntu 64 bits / Lazarus 2.0.0
x86_64-linux fpc 3.0.4 with <br>
</p>
<p>{$LINKLIB c}<br>
{$LINKLIB usb-1.0}<br>
</p>
<p>In a terminal:<br>
</p>
<pre>git clone <a class="moz-txt-link-freetext" href="https://github.com/hansiglaser/pas-libusb.git">https://github.com/hansiglaser/pas-libusb.git</a></pre>
<pre>git checkout libusb-1.0</pre>
<pre>git pull</pre>
<p>startlazarus , open test1library.lpi, Compile<br>
launch in terminal:<br>
</p>
<pre>jean@First-Boss:~/03_travail/libusb/pas-libusb/src/examples$ ./test1library </pre>
<pre>Using libusb(x) v1.0.22.11312</pre>
<pre>Found 12 devices:</pre>
<pre> Bus 4 Device 3: ID 0480:0200, port: 2, port path from HCD: 0, Speed: unknown (4)</pre>
<pre> Bus 4 Device 2: ID 0781:5581, port: 1, port path from HCD: 0, Speed: unknown (4)</pre>
<pre> Bus 4 Device 1: ID 1D6B:0003, port: 0, Speed: unknown (4)</pre>
<pre> Bus 3 Device 2: ID 2109:0811, port: 1, port path from HCD: 0, Speed: 480 Mbit/s (USB HighSpeed)</pre>
<pre> Bus 3 Device 1: ID 1D6B:0002, port: 0, Speed: 480 Mbit/s (USB HighSpeed)</pre>
<pre> Bus 1 Device 1: ID 1D6B:0002, port: 0, Speed: 480 Mbit/s (USB HighSpeed)</pre>
<pre> Bus 2 Device 4: ID 04A9:2220, port: 4, port path from HCD: 0, Speed: 12 Mbit/s (USB FullSpeed)</pre>
<pre> Bus 2 Device 6: ID 046D:C077, port: 4, port path from HCD: 0->4->4, Speed: 1.5 Mbit/s (USB LowSpeed)</pre>
<pre> Bus 2 Device 5: ID 0566:3002, port: 1, port path from HCD: 0->33->33, Speed: 1.5 Mbit/s (USB LowSpeed)</pre>
<pre> Bus 2 Device 3: ID 05E3:0606, port: 4, port path from HCD: 0->128, Speed: 12 Mbit/s (USB FullSpeed)</pre>
<pre> Bus 2 Device 2: ID 0451:2046, port: 1, port path from HCD: 0, Speed: 12 Mbit/s (USB FullSpeed)</pre>
<pre> Bus 2 Device 1: ID 1D6B:0001, port: 0, Speed: 12 Mbit/s (USB FullSpeed)</pre>
<pre>jean@First-Boss:~/03_travail/libusb/pas-libusb/src/examples$ </pre>
<p></p>
<p>Test dependencies:</p>
<pre>jean@First-Boss:~/03_travail/libusb/pas-libusb/src/examples$ ldd ./test1library
linux-vdso.so.1 (0x00007fffe2b8a000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fae647d1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fae645e6000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fae645c0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fae6459f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fae64a51000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fae64594000)
</pre>
<pre>jean@First-Boss:~/03_travail/libusb/pas-libusb/src/examples$ objdump -p ./test1library | grep NEEDED </pre>
<pre> NEEDED libusb-1.0.so.0</pre>
<pre> NEEDED libc.so.6</pre>
<pre>jean@First-Boss:~/03_travail/libusb/pas-libusb/src/examples$ </pre>
<p></p>
<pre>
</pre>
<p><br>
</p>
<p><br>
</p>
</body>
</html>