Re: Shared library loading and static constructor

2019-03-23 Thread Sobaya via Digitalmars-d-learn
On Saturday, 23 March 2019 at 16:56:28 UTC, tchaloupka wrote: On Saturday, 23 March 2019 at 15:58:07 UTC, Sobaya wrote: What I am saying is that it can not be read when a code importing (a.d) a code including the static constructor (b.d) is compiled into shared library. Hi. I've tried to add

Re: Shared library loading and static constructor

2019-03-23 Thread tchaloupka via Digitalmars-d-learn
On Saturday, 23 March 2019 at 15:58:07 UTC, Sobaya wrote: What I am saying is that it can not be read when a code importing (a.d) a code including the static constructor (b.d) is compiled into shared library. Hi. I've tried to add your case to the repository and at it seems to be working for

Re: Shared library loading and static constructor

2019-03-23 Thread Sobaya via Digitalmars-d-learn
On Saturday, 23 March 2019 at 09:37:16 UTC, Andre Pany wrote: On Friday, 22 March 2019 at 17:52:34 UTC, Sobaya wrote: 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 no

Re: Shared library loading and static constructor

2019-03-23 Thread Andre Pany via Digitalmars-d-learn
On Friday, 22 March 2019 at 17:52:34 UTC, Sobaya wrote: 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 is

Re: Shared library loading and static constructor

2019-03-22 Thread Sobaya via Digitalmars-d-learn
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 de

Re: Shared library loading and static constructor

2019-03-22 Thread Andre Pany via Digitalmars-d-learn
On Friday, 22 March 2019 at 10:51:58 UTC, Sobaya wrote: I fail to load the shared library created in a specific situation, but I do not know the cause. a.d import b.d b.d static this() {} for above 2 files, I created shared library by following command. dmd a.d -shared

Shared library loading and static constructor

2019-03-22 Thread Sobaya via Digitalmars-d-learn
I fail to load the shared library created in a specific situation, but I do not know the cause. a.d import b.d b.d static this() {} for above 2 files, I created shared library by following command. dmd a.d -shared -of=a.so And I ran below code, but the library is not load