3 ms·
Every time I see something in C for Windows I see people using MinGW, gcc and friends just like they would do in a Unix-like system. But I wouldn't expect that
by lucasoshiro 1y ago
Every time I see something in C for Windows I see people using MinGW, gcc and friends just like they would do in a Unix-like system. But I wouldn't expect that they are tools that Microsoft recommends for developing on Windows.
So, a honest question from a Linux/Mac guy: what is the Windows-y way to do that?
- int_19h 1y agoThe most Windows-y way to do that is to get Visual Studio (Community Edition is free for non-commercial use). It still has project templates for pure Win32 apps even, although they are C++ rather than C.
- dwattttt 1y agoA cursory browse says there's no Linux-isms in the code base, so the Windows-y way to build that (without going into licensing) would be to use the Visual Studio Build Tools. They're the CLI toolchain you get for Visual Studio, but free when compiling open source projects (as of recently: https://devblogs.microsoft.com/cppblog/updates-to-visual-studio-build-tools-license-for-c-and-cpp-open-source-projects/ https://devblogs.microsoft.com/cppblog/updates-to-visual-stu...) They still notionally need to run on a Windows machine, although I recall people have managed to run them under wine before. EDIT: It took me a few reads to parse what the link is saying, so: using the toolchain to compile open source dependencies is fine, even if your codebase is closed source, so long as the closed source part isn't being built with the Build Tools.
- lucasoshiro 1y agoThanks!
- thefilmore 1y agoI wrote a guide [1] that collects this information in one place. [1] https://akr.am/blog/posts/a-guide-to-compiling-programs-on-windows https://akr.am/blog/posts/a-guide-to-compiling-programs-on-w...
- card_zero 1y agoI use Pelle's C. Never seen it mentioned here. Based (a long time ago) on LCC. I think it's sweet.
- debugnik 1y agoI remember Pelles C being the first full C11 implementation, which I felt was impressive for such an unpopular toolchain. I guess they can't switch to a FOSS licence because of the licence of LCC? How much of the original code even remains after more than 20 years and several C standards later?