C++ 相当于 Windows 中的 ./configure?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4179800/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 14:45:56  来源:igfitidea点击:

The equivalent of ./configure in Windows?

c++windowscompilation

提问by Brad

What is the equivalent of ./configurein Windows?

./configureWindows 中的等价物是什么?

Sometimes I download a C/C++ library and when I use the make it, it says "use ./configure" but obviously ./configurecan only be used on a Linux machine and the libraries don't usually have instructions for compiling on Windows (although they do support Windows, they don't provide instructions).

有时我下载一个 C/C++ 库,当我使用它时,它说“使用./configure”但显然./configure只能在 Linux 机器上使用,并且这些库通常没有在 Windows 上编译的说明(尽管它们确实支持 Windows ,他们不提供说明)。

For example, the library wxSVG says it works on Windows, but when I download it I don't see any instructions for compiling on Windows, and I only Linux files for configuring it.

例如,库 wxSVG 说它可以在 Windows 上运行,但是当我下载它时,我没有看到任何在 Windows 上编译的说明,我只看到用于配置它的 Linux 文件。

采纳答案by zwol

Actually, ./configureis not Linux-specific at all. Its original purpose was to smooth over the differences between the many variants of Unixnow thankfully relegated to the dust heap of history, but nowadays it may well know how to set up things to work on Windows.

实际上,./configure它根本不是 Linux 特有的。它最初的目的是消除Unix许多变体之间的差异,幸好现在已经归入历史的尘埃堆,但现在它很可能知道如何设置在 Windows 上工作的东西。

I would install the MinGW/MSYSdevelopment tools and see if the configure script is happy in that environment. (If that doesn't work, I can't help you any further.)

我将安装MinGW/MSYS开发工具并查看配置脚本在该环境中是否满意。(如果这不起作用,我无法进一步帮助您。)

回答by patti_jane

I just faced with the same issue and here is what I did,

我刚刚遇到了同样的问题,这就是我所做的,

I first installed MinGwusing the installation manager (with msys base included). Then I go to C:\MinGW\msys\1.0\ folder in my pc, where msys.bat (to evoke the MinGW shell) and run it. Then on that bash screen, I navigated to the folder that I wanted to install initially. After that, using "./configure" and "make" worked just fine.

我首先安装MinGW的使用安装管理器(与MSYS基本包括)。然后我转到我电脑中的 C:\MinGW\msys\1.0\ 文件夹,其中 msys.bat(调用 MinGW shell)并运行它。然后在那个 bash 屏幕上,我导航到我最初想要安装的文件夹。之后,使用“./configure”和“make”工作得很好。

回答by SingleNegationElimination

./configureis a script that comes with the source you have downloaded. You will use it the same on windows as you do on any other operating system. Unfortunately, you will need a posix-like shell to run it. A good option for that is to use mingwor cygwin

./configure是您下载的源代码附带的脚本。您将像在任何其他操作系统上一样在 Windows 上使用它。不幸的是,您需要一个类似 posix 的 shell 来运行它。一个不错的选择是使用mingwcygwin

回答by MFH

I'd say that this is program dependant. You see "configure" is a program/script in the local directory, it's not a global command/program (like "dir" would be)... You either have luck to find something like "configure.bat" or "configure.cmd", or you'd have to adapt the configure-file into a BATCH-file.

我会说这取决于程序。你看到“configure”是本地目录中的一个程序/脚本,它不是一个全局命令/程序(就像“dir”那样)......你要么很幸运找到像“configure.bat”或“configure.bat”这样的东西。 cmd”,或者您必须将配置文件改编为批处理文件。

回答by MNeto

You only run the ./configure command when building certain applications from source.

从源代码构建某些应用程序时,您只能运行 ./configure 命令。

So Unzip it where you want to install it and then go to the folder where you unziped it and run "./configure"

因此,将其解压缩到您要安装的位置,然后转到解压缩的文件夹并运行“./configure”