On 14/07/2024 2:53 AM, ryuukk_ wrote:
First of all, i build with `ldmd2`
Second of all, i do not use DUB
Lastly, it fails with:
```
ldmd2 -L-staticĀ ...
```
```
/usr/bin/ld: cannot find -lphobos2-ldc-shared: No such file or directory
/usr/bin/ld: cannot find -ldruntime-ldc-shared: No such file or directory
```
Why does it complain about SHARED when passing STATIC?
Doesn't look like the switch does what you are thinking it does.
```
-static
On systems that support dynamic linking, this overrides -pie and
prevents linking with the shared libraries. On other systems, this
option has no effect.
```
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
Preventing linking against, and swapping two different binaries to link
against are different things.
Specifying to link against the shared libraries for druntime + phobos is
done by the compiler, not the linker.
You might want to try ``--link-defaultlib-shared=false`` instead.