On Mon, Mar 13, 2017 at 12:19 PM, silvioprog <silviop...@gmail.com> wrote:
> On Mon, Mar 13, 2017 at 8:04 AM, Fred van Stappen <fi...@hotmail.com> > wrote: > >> Hello and thanks to Silvio, z505, Giuliano. >> [...] >> > And this is the challenge, how to load that dependeny if they are not in >> the lib-system directory. >> > > 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: > > $ make > Free Pascal Compiler version 3.1.1 [2017/03/12] for x86_64 > Copyright (c) 1993-2017 by Florian Klaempfl and others > Target OS: Linux for x86-64 > Compiling test/test.pp > Linking test/test > 38 lines compiled, 0.1 sec > > $ make test > I'm lib A > I'm lib B > Example II (using both loadlibrary and dlsym): - fpc loads liba/liba and calls their funcs; - liba loads dep libb and calls its func; - libb loads dep liba and calls its func. Result: $ make test I'm lib A a.dep: I'm lib B I'm lib B b.dep: I'm lib A I think this test above simulates a plugin/module dependence environment. :-) -- Silvio Clécio
dl2.tar.gz
Description: GNU Zip compressed data
_______________________________________________ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other