你可以静态编译cygwin的应用程序? [英] Can you statically compile a cygwin application?
问题描述
的cygwin是否允许静态编译的二进制?这将prevent为cygwin1.dll正对目标机器的路径的需要。
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.
另请参见常见问题解答:结果
<一href=\"http://cygwin.com/faq/faq.html#faq.programming.win32-no-cygwin\">http://cygwin.com/faq/faq.html#faq.programming.win32-no-cygwin
<一href=\"http://cygwin.com/faq/faq.html#faq.programming.static-linking\">http://cygwin.com/faq/faq.html#faq.programming.static-linking
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的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!