Til, a command language written in D
Cléber Zavadniak
contato+til at cleber.solutions
Sun Jun 6 01:35:36 UTC 2021
Heeey! Fixed it! Thanks to this 2016 thread:
https://forum.dlang.org/post/o3tvfh$1lvk$1@digitalmars.com
In short:
1. call `dlerror()` to clean up any eventual old error messages
(just in case);
2. do **not** look into `lh` (the "library handler") to check for
errors, because it **can** be null even without any error (see
Jacob Carlborg answer on that thread)
3. after calling `dlopen`, using the result of another call to
`dlerror()` to check for errors (it should be NULL if everything
went okay).
Yay! Now I can create modules linked against `libphobos2` shared
library!
ldd libtil_exec.so
ldd (0x7f8ccd0d9000)
libphobos2-ldc-shared.so.96 =>
/usr/lib/libphobos2-ldc-shared.so.96 (0x7f8cccb6b000)
libdruntime-ldc-shared.so.96 =>
/usr/lib/libdruntime-ldc-shared.so.96 (0x7f8ccca0e000)
libunwind.so.1 => /usr/lib/libunwind.so.1 (0x7f8ccc9f7000)
libc.so => ldd (0x7f8ccd0d9000)
More information about the Digitalmars-d-announce
mailing list