Re: Dynamically Loading a D DLL From a D Program

2016-12-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 14 December 2016 at 21:38:27 UTC, Benjiro wrote: It also seems that the core runtime is incomplete with basic loading but no handling of dlsym, so your still forced to use the basic c conversion casting. int function() fn = cast(int function())dlsym(lib, libFunction); fn(); Y

Re: Dynamically Loading a D DLL From a D Program

2016-12-14 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 14 December 2016 at 21:38:27 UTC, Benjiro wrote: Silly question: In this post about static / dynamic loading, i noticed that it uses the dlopen/dlclose, while there is a core.runtime for handling the loading. http://dlang.org/dll-linux.html#dso9 Dynamically Loading a D DLL From

Dynamically Loading a D DLL From a D Program

2016-12-14 Thread Benjiro via Digitalmars-d-learn
Silly question: In this post about static / dynamic loading, i noticed that it uses the dlopen/dlclose, while there is a core.runtime for handling the loading. http://dlang.org/dll-linux.html#dso9 Dynamically Loading a D DLL From a D Program void* lh = dlopen("libdll.so",