undefined reference to `rt_loadLibrary'

Jean-Louis Leroy via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 30 10:01:51 PDT 2017


On Sunday, 30 July 2017 at 16:44:52 UTC, Jean-Louis Leroy wrote:
> Hello,
>
> I am trying to dynamically load a shared object using 
> core.runtime.Runtime.loadLibrary. The link fails with a 
> undefined reference to `rt_loadLibrary' error. Indeed when I 
> `nm /usr/lib/x86_64-linux-gnu/libphobos2.a` I don't see it 
> there. Is an extra lib needed?
>
> [...]

OK after more googling I found that adding `dflags 
"-defaultlib=phobos2` to my dub.sdl file solves this problem.


More information about the Digitalmars-d mailing list