Live data from Hacker News

Cross-compiling binaries for Windows is easier than building natively

gist.github.com

151–160 of 349 posts

Re: Cross-compiling binaries for Windows is easier than building natively

#151

Only if you want to be trendchasing rather than letting backwards compatibility take care of itself... I'm a native Win32 developer, have been one for a few decades, and know quite a few others still using MSVC6 because it's fast and enough for what they do. Takes Long file paths: Azure, OpenSearch, and ~90 other open source projects have to document how to enable long file paths on Windows because the default is a ~…

> Only if you want to be trendchasing

Cross-platform compiling is not a trend, it is one of the only two sane solutions to supporting customers.

The other is browser-based SaaS. But now you have two problems, to paraphrase Zawinski.

Re: Cross-compiling binaries for Windows is easier than building natively

#152
post #78

Earlier quoted context omitted.

Microsoft always had great developer tech. And having access to that tech more freely (as in on other platforms, partially open source etc) is a significant plus for me. I loved .net back in 2003 or whatever. Then I never got to use it for years because I was on unix land. It is now open source and multi platform. They attacked open anything with all their might (and they were fucking mighty) and the enemy still flou…

> Microsoft always had great developer tech. when, exactly? in the 90s-2000s they were always a poor imitation of Borland's and from the 2010s to today JetBrain's tools blow them out of the water

Typescript is ranked number 4 according to Github statistics in 2022[0].

VSCode is also very popular. I couldn't find any good statistics comparing different text editors, but atom is sunsetting this year, and VSCode continues to grow as some anecdotal evidence.

Visual Studio is still a great IDE for C++ imo. CLion is the only other big IDE for C++ that I've had suggested often.

C# is ranked #9 in github usage[0].

I would consider these "great developer tech", and their popularity seems to confirm that.

Edit: DirectX is also a pretty big deal since afaik it's the only way you can make an Xbox game. I don't have enough experience to say whether DX is great developer tech or not though. I often hear how horrible Metal is more often than I hear negativity about DX, but that's just my experience.

[0] https://madnight.github.io/githut/#/pull_requests/2022/1

Re: Cross-compiling binaries for Windows is easier than building natively

#153

Earlier quoted context omitted.

I was sad to find out "Zig supports only the last three macOS versions". No ncdu2 for me :( https://github.com/ziglang/zig/pull/10232#issue-1064864004

Apple only supports the last three macOS versions too, so if you're on an older one than that you are not getting security vulnerability patches.

One of Zig's claims to fame is how widely supported/cross-platform their build tools are, and I had high hopes. But they don't publicize this limit of their macOS support -- I found out the hard way. I really appreciate how far MacPorts bends over backwards to keep things working.

I love my ancient machine and have a few 32-bit apps I need, though I guess old hardware isn't quite the excuse it used to be.

https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.ht...

Re: Cross-compiling binaries for Windows is easier than building natively

#154

Now try building a "portable" binary that runs on a version of Linux older than yours.

If you want to build binaries for a distro, build in that distro. If that distro has a Docker image, it's as simple as: docker run -v "$PWD:/src" olddistro:version /src/build.sh $dayjob supports distros as old as CentOS 7 and as new as Ubuntu 22.04 this way. Compiling on one distro and then expecting it to work on another distro is a foolhardy errand. Libraries have different versions, different paths (eg /usr/lib vs…

CentOS 7 is from 2014. That isn’t very old.

Re: Cross-compiling binaries for Windows is easier than building natively

#156
post #152

Earlier quoted context omitted.

> Microsoft always had great developer tech. when, exactly? in the 90s-2000s they were always a poor imitation of Borland's and from the 2010s to today JetBrain's tools blow them out of the water

Typescript is ranked number 4 according to Github statistics in 2022[0]. VSCode is also very popular. I couldn't find any good statistics comparing different text editors, but atom is sunsetting this year, and VSCode continues to grow as some anecdotal evidence. Visual Studio is still a great IDE for C++ imo. CLion is the only other big IDE for C++ that I've had suggested often. C# is ranked #9 in github usage[0]. I…

see, I buy popular

but great? absolutely not

and as someone who's uses both: VS without Resharper is still a decade behind Jetbrains' IDEs

Re: Cross-compiling binaries for Windows is easier than building natively

#157

Only if you want to be trendchasing rather than letting backwards compatibility take care of itself... I'm a native Win32 developer, have been one for a few decades, and know quite a few others still using MSVC6 because it's fast and enough for what they do. Takes Long file paths: Azure, OpenSearch, and ~90 other open source projects have to document how to enable long file paths on Windows because the default is a ~…

> I'm a native Win32 developer, have been one for a few decades, and know quite a few others still using MSVC6 Doesn't that tie you to a really old C runtime, and aren't security holes often found in the C runtime?

It links dynamically to msvcrt.dll which is updated as part of the os. I believe it still gets updates as long as it doesn't break the ABI. Modern vc++ links with the universal CRT which is an independently updated msvcrt distribution.

Re: Cross-compiling binaries for Windows is easier than building natively

#158
post #94
post #51

Earlier quoted context omitted.

> The only current headache is that there's no pure Rust bundler, to make ".msi" or ".msix" installer files. I have set up a toolchain based on Wix, running via Mono and Wine on Linux, for the purpose of packaging some rather complex .msi files in a commercial software project. Has been running on the Linux-based CI servers of that project for 10 years straight now, with the only change having been that the entire ch…

WiX is great. I have been using it for over a decade to package an internal application. It's all driven by a simple text file which I liked over Microsoft's packaging offerings.

The Windows Installer XML Toolset (WiX) is owned by Microsoft.

Re: Cross-compiling binaries for Windows is easier than building natively

#159

Earlier quoted context omitted.

Apple only supports the last three macOS versions too, so if you're on an older one than that you are not getting security vulnerability patches.

One of Zig's claims to fame is how widely supported/cross-platform their build tools are, and I had high hopes. But they don't publicize this limit of their macOS support -- I found out the hard way. I really appreciate how far MacPorts bends over backwards to keep things working. I love my ancient machine and have a few 32-bit apps I need, though I guess old hardware isn't quite the excuse it used to be. https://dor…

I'm interested in re-evaluating this policy once we get a bit further along in the project. It could work nicely given that we have OS version min/max as part of the target, available to inspect with conditional compilation. We get a lot of requests to support Windows all the way back to XP too, despite Microsoft's long-expired support.

All this scope creep takes development efforts away from reaching 1.0 however. If we had more labor, then we could potentially take on more scope. And if we had more money then we could hire more labor.

So if y'all want Zig to support a wider OS version range, we need some more funding.

Re: Cross-compiling binaries for Windows is easier than building natively

#160
post #80
post #53

Earlier quoted context omitted.

I suspect if you restrict it to developers the numbers would look very, very different on the stackoverflow survey windows is 41.2%: https://insights.stackoverflow.com/survey/2021#most-popular-...

If you toggle that response to "All Respondents" instead of "Professional Developers" Windows goes up to 45%. Plus, 3% of users are using windows subsystem for Linux. So 48%. Whereas Mac and Linux are both at 25%. Even for developers, Windows is still the clear majority.

Interesting. So 50% Unix and 48% Windows (and 3% are targeting Unix anyway). That's quite a swing over the past 20 years - there was a time where aside the occasional web developer with a Mac, everyone was on Windows. Leaving out Linux, the interesting part has been how much market that Apple has chiseled away.
Post reply on HN