Live data from Hacker News

Cross-compiling binaries for Windows is easier than building natively

gist.github.com

91–100 of 349 posts

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

#91
post #77

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 ~…

It's incredibly fitting that all the links on that post are 403 Forbidden

Microsoft has never really "got" the idea of URLs. The only links to Microsoft stuff you should expect to still work properly in a year from learning them are in the form of an aka.ms alias which is publicly advertised.

Anything else, maybe it's a brief article explaining a technology you care about, next week somebody replaces that with a video blog of some people who don't really know much about it but are sure they'll become world experts over the next months and years - and you're invited on their journey, then the blog becomes a wiki, then it becomes an exciting new user-led forum, and then... it's a 404 because they were re-assigned to a different project and all knowledge was destroyed.

Raymond used to be just one of hundreds, maybe thousands of Microsoft bloggers. Then one day Microsoft decided blogging was not on brand and it just blowtorched all the blogs except a few very popular ones like The Old New Thing.

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

#92
post #81
post #21

For me SDK sizes are showstopper. Mingw packages are probably 100-200 Mb total. To build anything native one has to install Windows (20+Gb in modern version and then Visual Studio 40+Gb). Not so easy to fit it all on an SSD drive. Xcode also have this problem now. 8Gb for Xcode 7 is manageable. But why 70Gb for Xcode 11?

The visual studio build tools are substantially smaller than 40GB. My IDE install is about 25GB, and visual studio has distributed the build tools separately since vs2015 - my toolchains directory is about 4GB including whatever dotnet runtimes, windows GDK. > Not so easy to fit it all on an SSD drive. Professionally, no excuse. As an open source or otherwise unpaid pursuit, a 250GB SSD is about $45 on Amazon right n…

*>My IDE install is about 25GB

Would love to see a breakdown of where that space is going. FWIW IntelliJ takes up 2.5GB, and honestly, even THAT seems like a lot to me.

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

#93
post #78

Earlier quoted context omitted.

Oh, you and the article's author are either forgiven or seeing the best in people. Me, on the other hand, who lived the Microsoft with their shady dealings in Bill's / Ballmer's era, I remember their crushing on OEM's to not allow even a shred of openness in their systems. Only because of shifting in developer's in favor of Apple's / Google's Microsoft changed the tune with "Microsoft loves Linux". Bleah! I have no l…

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…

I just built an app in Blazor, which is Microsoft's React alternative, except you code everything in C# instead of JavaScript. Once I understood it I found myself able to write and debug code very quickly.

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

#94
post #51
post #14

It is. I generate the Windows executables for a program by cross-compiling Rust on Linux. Then test with Wine. The Rust crates are cross-platform enough that I don't have to special case platforms. This is easier than having a Windows machine. The only current headache is that there's no pure Rust bundler, to make ".msi" or ".msix" installer files. If you dump the legacy OS stuff, it gets easier.

> 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.

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

#95
post #81

Earlier quoted context omitted.

The visual studio build tools are substantially smaller than 40GB. My IDE install is about 25GB, and visual studio has distributed the build tools separately since vs2015 - my toolchains directory is about 4GB including whatever dotnet runtimes, windows GDK. > Not so easy to fit it all on an SSD drive. Professionally, no excuse. As an open source or otherwise unpaid pursuit, a 250GB SSD is about $45 on Amazon right n…

It's interesting how people assume that their world is everyone else's... It's easy to forget that there are billions of people for whom $45 is a massive investment, and that SSD isn't so conveniently available even if they have the money. I know I got into programming on a mix of graphing calculators and thrown out PCs, and I also distinctly remember having to work around the download sizes of tooling because I was…

I’d say the part where the gp specifically said ssd invalidates your point __in this particular situtation__ because a person worried about their budget wouldn’t splurge on an ssd. I also, after a cursory search, have found that the cheapest hard drives are around $25 USD. While $20 isn’t nothing, it also isn’t budget-breaking.

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

#96
post #64

Earlier quoted context omitted.

I do need to develop on a Macbook. The hardware is just so much better than anything else out there. This is my personal opinion of course, but I would rather stop being a software developer than to develop software using a different laptop available on the market today.

Meanwhile I’d rather serve coffee than be a software developer on any laptop! I can’t fathom developing on anything other than a high-end desktop. M1 is very impressive. But I hate macOS as much, if not more than, you hate Windows. My Threadripper makes me very happy.

That’s fine. The criteria people have for being software engineers is different. I just gave my personal opinion. I don’t think there is a right or wrong.

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

#97
post #86

Earlier quoted context omitted.

Isn't that simply a matter of targeting an older glibc? I am probably missing something though.

Yes, "simply". It's a very fun process. Around 100 times more fun than the onerous git config --global core.symlinks true

Anyone who talks nonchalantly about glibc hasn't had their time eaten up by glibc.

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

#98
post #87

Earlier quoted context omitted.

Meanwhile I’d rather serve coffee than be a software developer on any laptop! I can’t fathom developing on anything other than a high-end desktop. M1 is very impressive. But I hate macOS as much, if not more than, you hate Windows. My Threadripper makes me very happy.

Yeah, given the sheer cpu/ram/m.2 power of what even a tiny NUC provides, with modular, replaceable monitor(s)/keyboard/mouse/USB(3/C/Thunderbolt)/HDMI etc, for less than a Mac, I am unable to understand the appeal of a laptop. And I use a i7/64GB/1TB NUC for traveling! I use a twice as powerful Ryzen rack server for my office dev box. 5m extension cables so the noise is in a closet. I have no problems with external…

I live in a small apartment with my partner who also works from home. We don’t have enough space to dedicate to two desks. We also travel a lot, so I need to be able to take my work with me.

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

#99
post #21

For me SDK sizes are showstopper. Mingw packages are probably 100-200 Mb total. To build anything native one has to install Windows (20+Gb in modern version and then Visual Studio 40+Gb). Not so easy to fit it all on an SSD drive. Xcode also have this problem now. 8Gb for Xcode 7 is manageable. But why 70Gb for Xcode 11?

[deleted]

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

#100
post #44

Earlier quoted context omitted.

I'm cross-compiling Mach engine[0] with Zig, it ends up being a quite small toolchain to cross-compile a game engine (using DirectX, Vulkan, OpenGL, and Metal on respective platforms) from any OS. The Zig toolchain is: * Windows: 61 MiB * Linux (x86): 49 MiB * macOS (x86): 42 MiB * macOS (arm): 38 MiB Zig provides almost everything that is needed to cross compile to those same targets out of the box, including libc a…

You can accomplish similar things by targeting, say, SDL2 with a C compiler. It's a nice solution when you don't need platform-specific stuff, but it's not a general substitute for having the platform SDK, alas. With that said, targeting SDL2 is what I do… but the apps I like to write are games.

Actually, it's better - my work includes everything needed to build:

* GLFW

* Dawn (Chrome's WebGPU implementation)

* The DirectX Shader Compiler (a fork of LLVM)

* Freetype and HarfBuzz

All from source, cross-compiled to every OS. Plus with Zig you can link+sign macOS binaries from Linux and Windows (AFAIK that's not possible with a regular C compiler, but maybe that's changed recently?)

Post reply on HN