3 ms·
Why would you need mingw on a Mac?
by jki275 6y ago
Why would you need mingw on a Mac?
- skissane 6y agoSuppose you have an application written in C, which is designed to be portable to macOS, Linux and Windows. Using your macOS laptop, you can compile it and run it under macOS. You can also compile the Windows executable from your macOS laptop, although you still need to move the executable to a Windows VM or machine to actually test it. But it means you can at least check your code change compiles correctly for Windows (which does have various differences in APIs, headers, etc) without actually having to go the Windows machine/VM. (You might try testing the Windows executable under Wine on either macOS, or even a Linux Docker container with Docker for Mac – however, that doesn't work well in practice, because Wine is full of bugs and gaps, and a lot of the time the executable doesn't work properly under Wine due to Wine bugs/gaps but works fine on real Windows. So you still need the Windows VM for testing. But you can stay away from it during compilation.)
- jki275 6y agoAh, ok. Fair enough, I misunderstood what you were trying to do. Mingw on mac is evidently in homebrew. I've never used it, no idea how well it works. I don't write Windows software if I can ever help it.
- skissane 6y ago> Mingw on mac is evidently in homebrew. I've never used it, no idea how well it works. I don't write Windows software if I can ever help it. Well, it works just as well as MinGW on Windows does. If something isn't working with MinGW on macOS/Linux, it isn't going to work in MinGW on Windows either. And MinGW on Windows works pretty well, but occasionally you hit some odd problems you might not have had with the Microsoft SDK (e.g. [1]). [1] https://stackoverflow.com/questions/57885666/mingw-localtime-r-works-in-one-time-zone-fails-in-another https://stackoverflow.com/questions/57885666/mingw-localtime...