2 import core
.stdc
.string
;
3 import core
.sys
.posix
.dlfcn
;
5 extern(C
) alias RunDepTests
= int function();
7 void main(string
[] args
)
9 auto name
= args
[0] ~ '\0';
10 const pathlen
= strrchr(name
.ptr
, '/') - name
.ptr
+ 1;
11 name
= name
[0 .. pathlen
] ~ "liblinkdep.so";
13 auto h
= Runtime
.loadLibrary(name
);
15 auto runDepTests
= cast(RunDepTests
)dlsym(h
, "runDepTests");
16 assert(runDepTests());
17 assert(Runtime
.unloadLibrary(h
));