Minimal environment for linking Win32 windowed 64bit exes usind LDC2
Luna
luna at foxgirls.gay
Fri Jul 18 16:58:13 UTC 2025
On Friday, 18 July 2025 at 16:50:07 UTC, realhet wrote:
> On Friday, 18 July 2025 at 15:42:23 UTC, realhet wrote:
>> On Friday, 18 July 2025 at 15:25:04 UTC, Kagamin wrote:
>>> ldc has libs in lib/mingw
>
> Ok I was doing too much:
>
> I uninstalled the whole sdk and it turned out It works
> miraculously just by itself:
> `ldc2 win32_app.d -L/subsystem:windows` as simple of that, very
> cool!
>
> And with the more complicated project, I think it also worked,
> but the error was just generated by static libraries I'm using:
> libwebp.lib
> turbojpeg-static.lib
>
> Inside these binaries I found hundreds of this text:
> /DEFAULTLIB:"LIBCMT"
>
> And the linker says this error as well:
> lld-link: error: could not open 'libcmt.lib': no such file or
> directory
> lld-link: error: could not open 'LIBCMT.lib': no such file or
> directory
> Error: linking with LLD failed
>
> There is no libcmt.lib on my HDD at all. There was
> ntuc_libcmt.lib in the windows SDK, but I uninstalled that so
> the mingW can be active.
>
> (Btw, these are the stuff that is turning people backwards from
> systems programming and turn them right into a browser's
> comfortable console. But not me: I spend 1 or 2 days on this
> every year, lol. Even I hate this 1980s style command line
> hell, I know this worth the struggle. :D)
libcmt and co are a part of the Windows SDK. So you’d get those
by installing Visual Studio C++ tools
More information about the Digitalmars-d-learn
mailing list