Top
Best
New

Posted by deevus 18 hours ago

I fixed Windows native development(marler8997.github.io)
694 points | 337 commentspage 5
throw_win32dev 13 hours ago|
I will never cease to be amused by these 'Unixhead has to do windev. Reinvents the wheel' blog posts.
tehologist 6 hours ago||
I don't understand, just use scite editor with tcc. About a couple of megs download, no install required and your apps will run on everything from win 98 to linux with wine. And if the answer is c++ support then you get all the pain you deserve using that cursed language
gnarlouse 7 hours ago||
“Don’t do it”

I fixed windows native development. Band together friends, force WSL3 as the backbone of Windows.

borland 6 hours ago||
I thought the title was clickbait, but no, he really did fix it! Nice
fassssst 13 hours ago||
You can also install visual studio build tools via the built in winget package manager.
jevinskie 16 hours ago||
Were you around before the new installer came out? It was light speed compared to what was before!
delta_p_delta_x 14 hours ago||
No one should use any of these weird Frankenstein monstrosities in 2026. And a batch script? :( PowerShell exists.

Install:

  - contrary to the blog post, the entirety of Visual Studio, because the IDE and debugger is *really damn good*.

  - LLVM-MinGW[1]
Load the 'VSDevShell' DLL[2] for PowerShell, and you're good to go, with three different toolchains now:

  cl.exe from VS
  clang-cl.exe—you don't need to install this separately in VS; just use the above-mentioned llvm-mingw clang.exe as `clang.exe --driver=cl /winsysroot <path\to\Windows SDK> /vctoolsdir <path\to\VC>`. Or you can use it in GNU-driver-style mode, and use -Xmicrosoft-windows-sys-root. This causes it to target the Windows ABI and links against the VS SDK/VC tools
  `clang.exe` that targets the Itanium ABI and links against the MinGW libraries and LLVM libc++.
Done and dusted. Load these into a CMake toolchain and never look at them again.

People really like overcomplicating their lives.

At the same time, learn the drawbacks of all toolchains and use what is appropriate for your needs. If you want to write Windows drivers, then forget about anything non-MSVC (unless you really want to do things the hard way for the hell of it). link.exe is slow as molasses, but can do incremental linking natively. cl.exe's code gen is (sometimes) slightly worse than Clang's. The MinGW ABI does not understand things like SAL annotations[3], and this breaks very useful libraries like WIL[4] (or libraries built on top of them, like the Azure C++ SDK[5] The MinGW headers sometimes straight up miss newer features that the Windows SDK comes with, like cfapi.h[6].

[1]: https://github.com/mstorsjo/llvm-mingw

[2]: https://learn.microsoft.com/en-gb/visualstudio/ide/reference...

[3]: https://learn.microsoft.com/en-gb/cpp/c-runtime-library/sal-...

[4]: https://github.com/microsoft/wil

[5]: https://github.com/Azure/azure-sdk-for-cpp

[6]: https://learn.microsoft.com/en-gb/windows/win32/cfapi/build-...

shevy-java 13 hours ago||
LLVM-MinGW sounds external to Microsoft though. I think the blog focused on in-Microsoft solutions. And I am not sure the "contrary to the blog content" is valid - compared to Linux, the Microsoft stack is much more annoying to install. I installed it, but it was annoying to no ends and took ages.

Good to know LLVM works on windows too though.

delta_p_delta_x 13 hours ago||
> compared to Linux, the Microsoft stack is much more annoying to install.

Not really. It's just different. As a cross-platform dev, all desktop OSs have their own idiosyncracies that add up to a net of 'they are all equally rather bad'.

userbinator 7 hours ago|||
CMD.EXE is fine. I'd rather use bash than the abomination that is PowersHell.
forrestthewoods 13 hours ago||
MinGW is the most monstrous of monstrosity. Never in a million years touch that garbage.
delta_p_delta_x 13 hours ago||
I dunno, it has its uses when porting software written for UNIX-first. Plus, I pointed out Clang, rather than GCC, because Clang is natively a cross-compiler. I don't like to be dogmatic about stuff; if it's useful then it's useful. If it isn't then I will say why (as I explained why there's no need for MSYS2/Cygwin below).
forrestthewoods 10 hours ago||
Unix-first software on Windows is extremely irritating. Do it right or don’t do it at all. Especially when doing it right is actually super easy. You just have to care.
a-dub 14 hours ago||
it's been 14 years since i've used msvc for anything real. iirc the philosophy back then was yearly versioned releases with rolling intermediate updates.

this seems to go down the road towards attempts at determinsticish builds which i think is probably a bad idea since the whole ecosystem is built on rolling updates and a partial move towards pinning dependencies (using bespoke tools) could get complicated.

kI3RO 9 hours ago||
c3 does this automatically, I implemented the same thing :)

https://github.com/c3lang/c3c/pull/2854

OlympicMarmoto 12 hours ago|
mmozeiko "fixed" windows native development, just use their script. Also PortableBuildTools already exists https://github.com/Data-Oriented-House/PortableBuildTools
More comments...