Re: Linux Dynamic Loading of shared libraries

2014-07-29 Thread seany via Digitalmars-d-learn
Bless you, mate. You described precisely what I was looking for. Nonetheless, I am still looking for a load and unload command to select and reject plugins in runtime.

Re: Linux Dynamic Loading of shared libraries

2014-07-29 Thread Sean Kelly via Digitalmars-d-learn
On Monday, 10 March 2014 at 11:59:20 UTC, Steve Teale wrote: Note that there is no call to Runtime.unloadLibrary(). The assumption her is that once the plugin has been loaded it will be there for the duration of the program. If you want to unload it you'll probably have to make sure the

Re: Linux Dynamic Loading of shared libraries

2014-07-29 Thread Carl Sturtivant via Digitalmars-d-learn
Can't retrieve the archive from that URL. britseyeview.com/plugin101.tar.bz2 Interested, so can you please fix? On Monday, 10 March 2014 at 11:59:20 UTC, Steve Teale wrote: On Sunday, 9 March 2014 at 12:07:22 UTC, Steve Teale wrote: Now suppose that my D shared library contains a class, rather

Re: Linux Dynamic Loading of shared libraries

2014-03-10 Thread Steve Teale
On Sunday, 9 March 2014 at 14:09:28 UTC, Tolga Cakiroglu wrote: For this, you create an Interface that matches to the method declaration of your class. But notice that instead of defining methods, you will define attributes those types' match to that class's methods. I did this before and

Re: Linux Dynamic Loading of shared libraries

2014-03-10 Thread Anthony Goins
On Monday, 10 March 2014 at 06:38:35 UTC, Steve Teale wrote: On Sunday, 9 March 2014 at 14:09:28 UTC, Tolga Cakiroglu wrote: For this, you create an Interface that matches to the method declaration of your class. But notice that instead of defining methods, you will define attributes those

Re: Linux Dynamic Loading of shared libraries

2014-03-10 Thread Steve Teale
On Sunday, 9 March 2014 at 12:07:22 UTC, Steve Teale wrote: Now suppose that my D shared library contains a class, rather that just module ctors/dtors, how do I go about creating an instance of that class and using its methods? After wandering down several dead-end paths, and help from other

Linux Dynamic Loading of shared libraries

2014-03-09 Thread Steve Teale
Martin Nowak's Gihub druntime Page has module main; import core.runtime, core.thread; void main() { auto lib = Runtime.loadLibrary(./liba.so); auto thr = new Thread({ auto lib = Runtime.loadLibrary(./liba.so); Runtime.unloadLibrary(lib); }); thr.start();

Re: Linux Dynamic Loading of shared libraries

2014-03-09 Thread Tolga Cakiroglu
Now suppose that my D shared library contains a class, rather that just module ctors/dtors, how do I go about creating an instance of that class and using its methods? Steve For this, you create an Interface that matches to the method declaration of your class. But notice that instead of

Re: Linux Dynamic Loading of shared libraries

2014-03-09 Thread Anthony Goins
On Sunday, 9 March 2014 at 12:07:22 UTC, Steve Teale wrote: Martin Nowak's Gihub druntime Page has module main; import core.runtime, core.thread; void main() { auto lib = Runtime.loadLibrary(./liba.so); auto thr = new Thread({ auto lib = Runtime.loadLibrary(./liba.so);