I know Cygwin is a Windows interface for Linux, but is there a Linux interface for windows.
If I use a Linux interface for Windows, once a library is built on this interface can it be used to build projects on Windows?
I’m looking for a solution to the myriad of build errors I get when building open source C++ Libraries.
Thanks
Advertisement
Answer
Cygwin is not a “Windows interface for Linux” per se. It’s a set of emulation libraries, tools, and bash shell that allows for existing Unix/Linux code to be recompiled and run on Windows. Apps compiled as EXEs within Cygwin can usually be redistributed to other Windows machines simply by including the built EXE and some subset of Cygwin DLLs into the same install directory.
I suspect if you took the open source code, and built as a shared libary (.dll) under Cygwin, you could link your code to that DLL. Might be possible to build .lib files, but I’ve never tried. Then distribute your executables built under Visual Studio (or other compiler), the Cygwin compiled binaries, and the Cygwin runtime together.