如何在 Windows 中运行 makefile
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17158419/
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
How to run makefile in Windows
提问by Yoda
I have folder consisting files:
我有包含文件的文件夹:
How to run makefile? In console I type:make
and it says no makefiles found.
如何运行makefile?在控制台中,我输入:make
并且它说没有找到 makefiles。
采纳答案by Gauthier Boaglio
Try to use MSYS : http://www.mingw.org/wiki/MSYS
尝试使用 MSYS:http: //www.mingw.org/wiki/MSYS
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present.
MSYS 是 GNU 实用程序的集合,例如 bash、make、gawk 和 grep,用于构建依赖于传统 UNIX 工具的应用程序和程序。
This allows to run bash-like scripts under windows.
这允许在 Windows 下运行类似 bash 的脚本。
MSYSis included in MinGW
package (direct download).
MSYS包含在MinGW
包中(直接下载)。
MinGW Shell :
MinGW外壳:
NOTE : CygWincan do this too, I think.
注意:我认为CygWin也可以做到这一点。
EDIT : The link to MinGW above is 32 bits. If you are interested in a 64 bits version of it, please have a look here.
编辑:上面到 MinGW 的链接是 32 位。如果您对它的 64 位版本感兴趣,请看这里。
EDIT :Changes have been made and the Windows Installer now comes with a bunch of installable packages (quite similar to apt-get install
under Debian). This comes with a GUI that allows to choose/customize additional tools. Download it from here(The link above is kind of deprecated).
编辑:已经进行了更改,Windows Installer 现在带有一堆可安装的软件包(与apt-get install
Debian 下的非常相似)。它带有一个允许选择/自定义其他工具的 GUI。从这里下载(上面的链接有点过时)。
回答by CATspellsDOG
Your cmd was in the wrong directory.
Shift and right-click in the folder that has the makefile (not on the makefile though) and then type: make
or if you have mingw: mingw32-make
.
您的 cmd 位于错误的目录中。Shift 并右键单击包含 makefile 的文件夹(尽管不在 makefile 上),然后键入:make
或者如果您有 mingw: mingw32-make
。
It should then work.
然后它应该工作。