Shared library loading and static constructor
Sobaya
sobaya007 at gmail.com
Fri Mar 22 17:52:34 UTC 2019
On Friday, 22 March 2019 at 11:00:32 UTC, Andre Pany wrote:
> On Friday, 22 March 2019 at 10:51:58 UTC, Sobaya wrote:
>> [...]
>
> As far as I know different to windows, linus will not search
> current working directory for a.so. if this is the issue here,
> you have different possibilities. You could determine the
> current working directory and use std.path: buildPath to create
> an absolute path to a.so.
> This path you can then use for Runtime.loadLibrary.
>
> Or you can set the environment variable LD_LIBRARY_PATH.
>
> I do not know what is the correct way on linux.
>
> Kind regards
> Andre
This is not a problem of path, I think.
Because when I do not write static constructor in b.d, that code
works.
This problem occurs only when static constructor is used.
More information about the Digitalmars-d-learn
mailing list