为什么configure.sh认为win32是Unix?

发布于 2024-08-08 19:47:46 字数 726 浏览 2 评论 0原文

我正在尝试在 Windows 中从源代码构建一个需要一些 Unix 工具的应用程序。我认为这显然是标准的 ./configure;制作; make install (没有安装文件)。首先,我尝试了 MinGW,但感到困惑的是 \bin 中没有 bash、autoconf、m4 或 automake exe。我确信我错过了一些明显的东西,但我还是安装了 Cygwin 只是为了继续前进。由于某种原因,当我运行时,

sh configure.sh

我得到:

platform                    unix
  compiler                    cc
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

我的操作系统有身份问题。显然,makefile 是错误的,因为我使用的不是 unix,而是 win32。为什么配置脚本会这样想?我认为它与 Cygwin 有关,但如果我删除它,我根本无法构建它。请帮忙;我很困惑。

是否可以使用 MinGW 进行构建? bash 的命令是什么? mingw32-makemake 相同吗?我注意到它们的尺寸不同。

I'm trying to build an application from source in windows that requires some Unix tools. I think it's the apparently standard ./configure; make; make install (there's no INSTALL file). First I tried MinGW but got confused that there was no bash, autoconf, m4, or automake exes in \bin. I'm sure I missed something obvious but I installed Cygwin anyways just to move forward. For some reason when I run

sh configure.sh

I get:

platform                    unix
  compiler                    cc
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

My OS has identity problems. Obviously the makefile is all wrong since I'm not on unix but win32. Why would the configure script think this? I assume it has something to do with Cygwin but if I remove that I can't build it at all. Please help; I'm very confused.

Also is it possible to build using MinGW? What's the command for bash and is mingw32-make the same as make? I noticed they're different sizes.

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

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

发布评论

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

评论(3

香橙ぽ 2024-08-15 19:47:46

一切都很好。当您进入 CygWin 时,您基本上是在模拟 UNIX。 sh 在 CygWin 内部运行,因此可以正确地将操作系统识别为 Unix。

查看GCW - 适用于 Windows 的 Gnu C 编译器

Everything is fine. When you are inside CygWin, you are basically emulating an UNIX. sh runs inside CygWin, and thus identifies the OS correctly as Unix.

Have a look at GCW - The Gnu C compiler for Windows

金橙橙 2024-08-15 19:47:46

另外,您可能对此帮助页面感兴趣,该页面详细介绍了最小系统(MSYS ),比如如何安装、配置等。 c.

这应该可以帮助您让 bash、配置和其余部分也适用于 MinGW。

Also, you might be interested in this help page, that goes into some detail about the minimal system (MSYS), such as how to install, configure et. c.

That should help you get bash, configure and the rest to work for MinGW as well.

北笙凉宸 2024-08-15 19:47:46

来自 Cygwin 主页

Cygwin 是适用于 Windows 的类似 Linux 的环境。它由两部分组成:

  • DLL (cygwin1.dll),充当 Linux API 模拟层,提供大量 Linux API 功能。
  • 提供 Linux 外观和感觉的工具集合。

由于configure 使用Cygwin 环境,因此它与模拟层交互,因此就像在Unix 环境中工作一样。

您是否尝试过构建应用程序并查看它是否有效?

From the Cygwin home page

Cygwin is a Linux-like environment for Windows. It consists of two parts:

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.

Since configure is using the Cygwin environment, it is interacting against the emulation layer and so it is just like it's working on a Unix environment.

Have you tried building the application and seeing if it works?

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