Live data from Hacker News

Cross-compiling binaries for Windows is easier than building natively

gist.github.com

61–70 of 349 posts

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

#61
post #34

Earlier quoted context omitted.

> 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. Maybe a decade ago, but SSDs are so much cheaper per GB nowadays. Around $0.11/GB. Pretty sure that's cheaper than the first 1TB HDD I've owned.

Not when you are on Macbook. Don't suggest external drives please ;)

But you don't have to develop on Macbook. So you intentionally chose a platform known for being really expensive and now your main complaint is that it's too expensive?

I don't really think that the toolchain is to blame for that one.

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

#62

Earlier quoted context omitted.

What's the standard for being an "actual Windows user"? Asking because I doubt e.g. my mom knows that NTFS has symlinks.

> What's the standard for being an "actual Windows user"? I think you misread that line.

Their message originally read "Actual Windows developers know NTFS has Symbolic Links"

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

#63
post #36

Earlier quoted context omitted.

It does support them, mklink. https://docs.microsoft.com/en-us/windows-server/administrati...

Yes, Windows does, but this post is complaining about support. Which led me to ask if Git is the problem. Cause Git also supports symlinks, but is clearly having issues on Windows.

I would assume the issue is that they need to disable symlink support by default on Windows because symlink support is disabled by default on Windows.

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

#64
post #34

Earlier quoted context omitted.

Not when you are on Macbook. Don't suggest external drives please ;)

But you don't have to develop on Macbook. So you intentionally chose a platform known for being really expensive and now your main complaint is that it's too expensive? I don't really think that the toolchain is to blame for that one.

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.

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

#65
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?

I ran into this when trying to test out Rust. On Windows, they recommend using native tools that require a multi-gigabyte download via the Visual Studio installer (and this is just for tools--not Visual Studio, the IDE).

It was annoying for me because part of the reason I wanted to try Rust on Windows was specifically to avoid multi-gigabyte C/C++ toolchain downloads. I bet the actual compiler and linker aren't that big, so I kind of wonder where all those bytes are going...

Aside: I see a sibling comment mentions Zig. While I haven't really explored Zig, the tiny single-binary download was a breath of fresh air. Go also had a quick and easy download, but I wanted a language without a garbage collector.

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

#66
post #34

Earlier quoted context omitted.

Not when you are on Macbook. Don't suggest external drives please ;)

But you don't have to develop on Macbook. So you intentionally chose a platform known for being really expensive and now your main complaint is that it's too expensive? I don't really think that the toolchain is to blame for that one.

[deleted]

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

#67
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 other problem with Xcode is that it won’t run on anything except a Mac, and MacOS licensing prevents one from running it on non-Mac hardware or virtualizing it. That’s why services like https://www.macstadium.com/ and AWS mac instances exist, but it’s very annoying to have to work around this just because of dinosaur business models and licensing.

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

#68
post #43

Earlier quoted context omitted.

Interesting, how can I install just the cmake + msvc to do command line builds with windows? I'm also installing wsl2 + mingw because it is so much lighter for compilation than many, many gigabytes of vis studio.

Download the build tools[0] and choose the appropriate options. I'd personally consider the following a good baseline: MSVC v143, CMake tools, Windows 11 SDK, Clang tools (if you don't want/need these you can shave off 3.5 GB). `zig cc` is another interesting alternative, it's just a single ~62 MB download. [0] https://visualstudio.microsoft.com/downloads/#build-tools-fo...

Thanks, I'll give that a try!

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

#69
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?

I ran into this when trying to test out Rust. On Windows, they recommend using native tools that require a multi-gigabyte download via the Visual Studio installer (and this is just for tools--not Visual Studio, the IDE). It was annoying for me because part of the reason I wanted to try Rust on Windows was specifically to avoid multi-gigabyte C/C++ toolchain downloads. I bet the actual compiler and linker aren't that…

Try cross-compiling Go apps that use GTK3 if you’d like to spend a few days in intense pain. It’s not there yet. Electron apps are probably the closest thing we have today that actually works correctly on Win / Linux / Mac.
Post reply on HN