Running an application, compiled in cygwin, without having cygwin installed

后端 未结 4 1993
旧巷少年郎
旧巷少年郎 2021-02-18 16:21

Let\'s say I have an application which I compiled under cygwin, and I want to distribute that application without having the user to install cygwin. Would it be enough to packag

4条回答
  •  后悔当初
    2021-02-18 16:46

    Does your application actually need any Cygwin provided Posix emulation? If not, you can compile it with the -mno-cygwin flag and it won't depend on cygwin at all, but will be a native Windows application. Often, you only need a real shell (bash) to configure and build your application, but you don't actually need the Posix functionality of Cygwin.

    Another alternative is MSYS + MinGW, which is a light-weight fork of Cygwin. This provides a compilation environment which produces native Windows apps by default.

    A third option would be to use the MinGW compilers from Cygwin itself. They should be available via the normal Cygwin package manager. Then you would configure the project for a cross-compile using the MinGW compilers.

提交回复
热议问题