The whole point of Cygwin is the level of Linux emulation, and by default (i.e. if you do not cross-compile), binaries need cygwin1.dll to run.
This does not apply to MinGW, which creates binaries as "native", like those from MSVC. However, MinGW comes with its own set of runtime libraries, specifically libstdc++-6.dll . This library can also be linked statically with -static-libstdc++ , in which case you also probably want to compile with -static-libgcc .
This does not mean that you can freely mix C ++ libraries from different compilers (see this page at mingw.org). If you do not want to limit yourself to the extern "C" interface in your library, you will most likely have to choose one compiler and stick with it.
As for your performance: using Cygwin only leads to a penalty (secondary?) In the actual interaction with the OS - in the case of unprocessed calculations, only the quality of the optimizer matters.
source share