Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



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


Thanks!


I wrote a guide [1] that collects this information in one place.

[1] https://akr.am/blog/posts/a-guide-to-compiling-programs-on-w...


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


I use Pelle's C. Never seen it mentioned here. Based (a long time ago) on LCC. I think it's sweet.


I 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?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: