Search code examples
c++windowscygwinmingwdaemon

Is it possible to port a Linux daemon to Windows using Cygwin or MinGW?


I have a Linux C++ application which run as a daemon. When user executes this application, it will be running in the background, listening on a port, and waiting for connection from the clients.

Is it possible to port this kind of application to Windows platform using Cygwin or MinGW?

Thanks.


Solution

  • Cygwin aims at POSIX/Linux source level compatibility, so your application is supposed to build and work there with no or only minor modifications.

    MinGW does not try to provide such a compatibility layer. It's just the GNU toolchain for Windows, so you would need to replace any uses of POSIX/Linux-specific APIs with Windows equivalents.