为什么configure.sh认为win32是Unix?
我正在尝试在 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-make
与 make
相同吗?我注意到它们的尺寸不同。
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一切都很好。当您进入 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
另外,您可能对此帮助页面感兴趣,该页面详细介绍了最小系统(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.
来自 Cygwin 主页
Cygwin 是适用于 Windows 的类似 Linux 的环境。它由两部分组成:
由于configure 使用Cygwin 环境,因此它与模拟层交互,因此就像在Unix 环境中工作一样。
您是否尝试过构建应用程序并查看它是否有效?
From the Cygwin home page
Cygwin is a Linux-like environment for Windows. It consists of two parts:
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?