Live data from Hacker News

I fixed Windows native development

marler8997.github.io

261–270 of 406 posts

Re: I fixed Windows native development

#262
post #3

This is harder than what I do. Just install LTSC Visual Studio build tools from [1], then chuck this in a cmd file: cl yourprogram.c /link user32.lib advapi32.lib ... etc etc ... I've built a load of utilities that do that just fine. I use vim as an editor. The Visual Studio toolchain does have LTSC and stable releases - no one seems to know about them though. see: https://learn.microsoft.com/en-gb/visualstudio/relea…

[deleted]

Re: I fixed Windows native development

#263
post #3

This is harder than what I do. Just install LTSC Visual Studio build tools from [1], then chuck this in a cmd file: cl yourprogram.c /link user32.lib advapi32.lib ... etc etc ... I've built a load of utilities that do that just fine. I use vim as an editor. The Visual Studio toolchain does have LTSC and stable releases - no one seems to know about them though. see: https://learn.microsoft.com/en-gb/visualstudio/relea…

I noticed Visual Studio 2026 doesn't have an LTSC release yet. Any idea when that will come out?

Re: I fixed Windows native development

#264
post #256

Earlier quoted context omitted.

Yeah it’s not too bad, but it does pull away from “so trivial it fits in a flippant HN comment”

Does it? Admittedly, it has been a while but I don't remember it differing too much from the good old ./configure && make paradigm with a few flags to both commands.

It’d fit in a comment, but not a flippant one ;)

Re: I fixed Windows native development

#265

Earlier quoted context omitted.

Example: I built a network daemon using the MSYS2 CLANG64 environment and llvm toolchain on Windows 10. Windows 7 x64 users could download the compiled single-file executable and run it just fine, so long as they installed Microsoft’s Universal C Runtime, which is a free download from Microsoft’s website.

> MSYS2 CLANG64 I get your point. Although my point is that there is actually zero need for MSYS at all for this, even as a developer, and especially not with the 'CLANG64' environment. These binaries themselves are built to run in the MSYS2 environment This is how I cross-compile from Windows... to Windows with LLVM-MinGW[1]: > (gci Env:PATH).Value.Split(';') | sort > clang-21.exe --version clang version 21.1.2 (htt…

I think you have it backwards, but I may misunderstand what you're saying.

I'm certain I haven't misunderstood the point of MSYS2's CLANG64 and other environments.

> These binaries themselves are built to run in the MSYS2 environment

I'm not sure if you're referring to the toolchain binaries or the binaries one produce's with them.

The CLANG64, etc. environments are 100% absolutely for certain for building software that can run outside of any MSYS2 environment!

You can, of course, build executables specifically intended to run inside those environments, but that’s not the primary use case.

> (gci Env:PATH).Value.Split(';') | sort

I don't want to use PowerShell or Cmd.exe when doing dev stuff on Windows. I want to do CLI work and author scripts in and for modern Bash, just like I would for Linux and macOS. I want to write Makefiles for GNU make, just like...

Now, sometimes there are bumps and sharp edges you have to deal with via `if [[ -v MSYSTEM ]]; then`, similar in Makefile, cygpath conversion, template/conditional code in sources, and so on. But that's a small price to pay, from my perspective, for staying in the same mental model for how to build software.

Re: I fixed Windows native development

#266
I don't really use Windows OS much, but why not just use MinGW? Then you have Clang on all platforms you can think of: Android, all the various Darwin flavors and of course Linux and Windows; as well as on platforms you can't think of like FreeBSD or even Haiku maybe? Like honestly what's the point of supporting MSVC at all?? Maybe I'm just not enough of a Windows nerd to understand? (so I'm basically wondering if mingw has any drawbacks)

Re: I fixed Windows native development

#267

I don't get why people go through all these flaming hoops and hurdles to deal with MSVC when MinGW and MinGW-w64/MSYS2 are options. In the latter case you even still get (mostly complete) MSVC ABI-compatibility if you compile with clang.

MinGW and MinGW-64/MSYS2 are just as inscrutable, fragile and new-user-hostile. The fact that you have to choose between MinGW (which has a 64 bit version) or MinGW64 (completely separate codebases maintained by different people as far as I can tell) is just the first in a long obstacle course of decisions, traps, and unexplained acronyms/product names. There are dozens of different versions, pre-built toolchains and packages to throw you off-course if you choose the wrong one.

If you're just a guy trying to compile a C application on Windows, and you end up on the mingw-w64 downloads page, it's not exactly smooth sailing: https://www.mingw-w64.org/downloads/

Re: I fixed Windows native development

#268

I don't get why people go through all these flaming hoops and hurdles to deal with MSVC when MinGW and MinGW-w64/MSYS2 are options. In the latter case you even still get (mostly complete) MSVC ABI-compatibility if you compile with clang.

Because it's fewer hoops and hurdles than using MinGW, in my experience.

Re: I fixed Windows native development

#270
post #38

Earlier quoted context omitted.

That's not correct. You don't have to give your credit card details or even be logged in but you are still required to have any Visual Studio license. For hobbyists and startups the VS Community license is enough but larger companies need a VS Professional license even for the VS Build Tools. How strict Microsoft is with enforcement of this license is another story.

You do not need a Professional or Enterprise license to use the Visual Studio Build Tools: > Previously, if the application you were developing was not OSS, installing VSBT was permitted only if you had a valid Visual Studio license (e.g., Visual Studio Community or higher). From ( https://devblogs.microsoft.com/cppblog/updates-to-visual-stu... ). For OSS, you do not even need a Community License anymore.

This does not apply if you're developing closed source:

> if you and your team need to compile and develop proprietary C++ code with Visual Studio, a Visual Studio license will still be required.

Post reply on HN