[fpc-other] How to set library search path ?
silvioprog
silvioprog at gmail.com
Mon Mar 13 17:10:17 CET 2017
On Mon, Mar 13, 2017 at 12:19 PM, silvioprog <silvioprog at gmail.com> wrote:
> On Mon, Mar 13, 2017 at 8:04 AM, Fred van Stappen <fiens at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-other/attachments/20170313/93ccf686/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dl2.tar.gz
Type: application/x-gzip
Size: 973 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-other/attachments/20170313/93ccf686/attachment.bin>
More information about the fpc-other
mailing list