4 ms·
>With Cygwin you get a GNU/Linuxish API as well as the Windows API. Genuine question, why is that useful? Intuitively, it seems like if you ever used that capa
by Sir_Substance 10y ago
>With Cygwin you get a GNU/Linuxish API as well as the Windows API.
Genuine question, why is that useful? Intuitively, it seems like if you ever used that capability, you'd end up with a horrible chimera program that can't run on linux or windows, which doesn't seem good.
- geofft 10y agoWell, the chimera program can totally run on Windows; it just uses a particular DLL for a good chunk of it's runtime. That's not super different from, say, a C# app with some native Win32 code, right? A couple of plausible scenarios: 1. You have a legacy UNIX app that is now only being used on Windows, but rewriting it entirely is a giant project. You can compile it against Cygwin, and then new development can run on Windows. 2. You have a cross-platform app that needs a few OS-specific things in certain places. Maybe it's some sort of system status checking/auditing tool, maybe it interacts with hardware drivers, etc. You can use #ifdef WIN32 and call Windows-specific APIs, just like you can use #ifdefs to check for Apple-specific or Linux-specific APIs, and you don't have to port your entire app away from the UNIX model.