与 cygwin1.dll 链接
我有一个在 Linux 上运行的小应用程序,想将其移植到 Windows。我发现使用 Cygwin,我可以通过将应用程序与 cygwin1.dll 库链接来简单地完成此操作,该库提供了许多 POSIX 和其他标准函数。我阅读了 Cygwin 网站上的常见问题解答和用户指南,但没有找到或不明白如何将我的源代码与该库链接起来。 我的应用程序使用 GTK+,我在 Windows 上使用 MinGW 成功编译并链接了它,但我必须禁用某些功能。现在我找到了 Cygwin,我想与其链接以再次提供此功能。
I have a little application running on Linux and want to port it to Windows. I found that with Cygwin i will be able to do it simple by linking the application with the cygwin1.dll library which make available a lot of the POSIX and other standard functions. I read the FAQ and the User Guide on the site of Cygwin but didn't find or didn't understand how can I link my source with this library.
My application uses GTK+ and I successfully compiled and link it on Windows with MinGW but I have to disable some of the functionality .Now that I find Cygwin I would like to link with it to make available again this functionality.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,您在 Cygwin 内编译源代码以生成 Windows 二进制文件。我很确定 Cygwin 会为您链接到正确的 dll。
当您最终编译二进制文件时,请确保 cygwin1.dll 位于 Windows 指定的 PATH 中。
Generally you compile your source inside of Cygwin to produce the Windows binary. I'm pretty sure Cygwin will take care of linking to the proper dlls for you.
When you finally get the binary compiled, make sure that the cygwin1.dll is in the PATH specified by Windows.