www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Try to create and load dynamic libraries on Linux

I want to build a set of dynamic libraries in D on Linux.
Then I want to load these libraries dynamically.

So I wrote a app with "extern (D): void hello(string text)..."
compiled with dub / "targetType":"dynamicLibrary"

...works fine. App called libapp.so

Then I tried to call these libs in a second app with dub

"import core.runtime;"
"auto handler = Runtime.loadLibrary("./libapp.so");"

In result, I got the error message
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

Isn't loadLibrary not enough for loading? Path seems to be 

Regards, Ozan
Nov 09 2019