DMD seems to overwrite the LIB env var with the LIB value in the sc.ini config file, instead of appending (or prepending) that value to the potentially existing variable (like LDC).
So it's impossible to use LIB to point to a directory containing required libs for linking, and one has to resort to `-L/LIBPATH:…` business.
The problem seems to be https://github.com/dlang/dmd/blob/71ba3fa46221daa0539b03ed7e41f454bd6ce326/src/dmd/mars.d#L722; existing DFLAGS are merged with the config file value in the line above, but LIB is simply overwritten.
Comment #1 by robert.schadek — 2024-12-13T19:20:36Z