mirror of
https://github.com/autc04/Retro68.git
synced 2024-09-07 13:54:33 +00:00
15 lines
348 B
D
15 lines
348 B
D
module lib; // module collides with lib.so
|
|
|
|
import core.runtime;
|
|
import core.stdc.stdio;
|
|
import core.stdc.string;
|
|
import core.sys.posix.dlfcn;
|
|
|
|
void main(string[] args)
|
|
{
|
|
auto name = args[0] ~ '\0';
|
|
const pathlen = strrchr(name.ptr, '/') - name.ptr + 1;
|
|
name = name[0 .. pathlen] ~ "lib.so";
|
|
auto lib = Runtime.loadLibrary(name);
|
|
}
|