问题描述
cygwin 是否允许静态编译的二进制文件?这将防止 cygwin1.dll 出现在目标机器的 PATH 中.
Does cygwin allow a statically compiled binary? This would prevent the need for cygwin1.dll being on the PATH of target machines.
推荐答案
不,目前无法静态链接到 cygwin1.dll;如果您的应用程序不使用 unix 仿真(即纯 win32),您可以将 -mno-cygwin 传递给编译器.
Nope, it's currently not possible to statically link against cygwin1.dll; if your application does not use unix emulation (i.e. pure win32) you can pass -mno-cygwin to the compiler.
另请参阅常见问题解答:
http://cygwin.com/faq/faq.html#faq.programming.win32-no-cygwin
http://cygwin.com/faq/faq.html#faq.programming.静态链接
See also the FAQ:
http://cygwin.com/faq/faq.html#faq.programming.win32-no-cygwin
http://cygwin.com/faq/faq.html#faq.programming.static-linking
这篇关于您可以静态编译 cygwin 应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!