<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 13, 2017 at 12:19 PM, silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_3205801522816042643gmail-">On Mon, Mar 13, 2017 at 8:04 AM, Fred van Stappen <span dir="ltr"><<a href="mailto:fiens@hotmail.com" target="_blank">fiens@hotmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div id="gmail-m_3205801522816042643gmail-m_-2712042414898481762gmail-m_-1488669551859796220divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:calibri,arial,helvetica,sans-serif" dir="ltr"><span class="gmail-m_3205801522816042643gmail-">
<p></p>
<div style="font-family:calibri,arial,helvetica,sans-serif;font-size:16px">
<span style="font-size:12pt">Hello and thanks to Silvio, z505, Giuliano.</span></div></span><span class="gmail-m_3205801522816042643gmail-m_-2712042414898481762gmail-">
<div style="font-family:calibri,arial,helvetica,sans-serif;font-size:16px"><span style="font-size:12pt">[...]</span><span style="font-family:arial,sans-serif;font-size:small;color:rgb(34,34,34)"> </span></div></span></div></div></blockquote><span class="gmail-m_3205801522816042643gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_3205801522816042643gmail-m_-2712042414898481762gmail-m_-1488669551859796220divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:calibri,arial,helvetica,sans-serif" dir="ltr"><span class="gmail-m_3205801522816042643gmail-m_-2712042414898481762gmail-"><div style="font-family:calibri,arial,helvetica,sans-serif;font-size:16px"><span style="font-size:12pt">And this is the challenge, how to load that dependeny if they are not in the lib-system directory.</span></div></span></div></div></blockquote></span></div><div><br></div><div>Strange. I'm using loadlibrary/dlsym and both works properly here. o.O Could you test the attached example? See its result on my Linux:</div><div><br></div><div><div><font face="monospace, monospace" size="1">$ make</font></div><div><font face="monospace, monospace" size="1">Free Pascal Compiler version 3.1.1 [2017/03/12] for x86_64</font></div><div><font face="monospace, monospace" size="1">Copyright (c) 1993-2017 by Florian Klaempfl and others</font></div><div><font face="monospace, monospace" size="1">Target OS: Linux for x86-64</font></div><div><font face="monospace, monospace" size="1">Compiling test/test.pp</font></div><div><font face="monospace, monospace" size="1">Linking test/test</font></div><div><font face="monospace, monospace" size="1">38 lines compiled, 0.1 sec</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">$ make test </font></div><div><font face="monospace, monospace" size="1">I'm lib A</font></div><div><font face="monospace, monospace" size="1">I'm lib B</font></div></div></div></div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">Example II (using both loadlibrary and dlsym):</div><div class="gmail_extra"><br></div><div class="gmail_extra">- fpc loads liba/liba and calls their funcs;</div><div class="gmail_extra">- liba loads dep libb and calls its func;</div><div class="gmail_extra">- libb loads dep liba and calls its func.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Result:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><font face="monospace, monospace" size="1">$ make test </font></div><div class="gmail_extra"><font face="monospace, monospace" size="1">I'm lib A</font></div><div class="gmail_extra"><font face="monospace, monospace" size="1">a.dep: I'm lib B</font></div><div class="gmail_extra"><font face="monospace, monospace" size="1">I'm lib B</font></div><div class="gmail_extra"><font face="monospace, monospace" size="1">b.dep: I'm lib A</font></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">I think this test above simulates a plugin/module dependence environment. :-)</div><div class="gmail_extra"><br></div>-- <br><div class="gmail-m_3205801522816042643gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>