寻找有关将 Linux 应用程序移植到 Windows 的信息

发布于 2024-08-30 01:44:07 字数 445 浏览 3 评论 0原文

今天我遇到了一本非常好的书: UNIX 到 Linux® 移植:综合参考 作者:Alfredo Mendoza、Chakarat Skawratananond、Artis Walker

这让我想起了我一直想知道的事情。 “将 Linux 应用程序移植到 Windows”。我的意思是在不涉及任何平台的情况下将本机 Linux 应用程序移植到本机 Windows

如果我能找到任何解释这个主题的好书。我脑子里有很多令人惊叹的 Linux 命令行工具,它们需要 Windows 端口。

请给我指出相关文章/教程/书籍。

PS:请不要告诉我使用像Cygwin这样的Linux仿真平台。

Today I've encountered a very good book : UNIX to Linux® Porting: A Comprehensive Reference
By Alfredo Mendoza, Chakarat Skawratananond, Artis Walker

This reminded me of the thing I always wanted to know. "Porting Linux apps to Windows". I mean porting native Linux apps to native Windows with no platforms involved.

If I can find any good book which explains this topic. I've lot of amazing linux command line tools in mind which needs a windows port.

Please point me to relevant articles/tutorials/books.

PS: please don't tell me to use linux emulation platforms like Cygwin.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

戈亓 2024-09-06 01:44:07

好吧,如果您不想使用仿真平台,MinGW 可能是您正在寻找的 API 。它提供了 Unix 和 Win32 应用程序之间的兼容性,并实现了一些 win32 API。我自己用它来编译 ns-3 模拟器,该模拟器设计为在 *nix 系统和 Cygwin 上运行。您仍然需要其中的预编译器语句来访问某些需要的 Win32 功能,或者修改宏/函数名称以实现交叉兼容性。例如,Sleep(..) 存在,但 sleep(..) 不存在。也没有 usleep(..)。我认为这个 API 只是让应用程序搬运工的生活更轻松,没有任何缺点。

Well, MinGW is possibly an API you're looking for, if you don't want to use emulation platforms. It provides compatibility between Unix and Win32 apps, and implements some of the win32 API. I'm using it myself for compiling the ns-3 simulator which is designed to run on *nix systems and Cygwin. You still need precompiler statements in there to access certain Win32 features where needed, or to modify macro / function names for cross-compatability. For instance, Sleep(..) exists but sleep(..) doesn't. There is also no usleep(..). I think this API just makes life easier for the application porter without any downsides.

天荒地未老 2024-09-06 01:44:07

系统管理系统MinGW 是将应用程序从 Linux 移植到 Windows 所需的两件事。

另一种方法是使用Cygwin。但我不认为它是 100% 移植,因为它添加了 Cygwin 的依赖项。

MSYS & MinGW are two things that are required for porting apps from Linux to Windows.

Alternative way is to use Cygwin. But I don't consider it as 100% porting because it adds dependencies of Cygwin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文