你可以静态编译一个cygwin应用程序吗? [英] Can you statically compile a cygwin application?

查看:184
本文介绍了你可以静态编译一个cygwin应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.static-linking

这篇关于你可以静态编译一个cygwin应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆