如何安装和使用"make"工具在Windows中? [英] How to install and use "make" in Windows?

查看:1972
本文介绍了如何安装和使用"make"工具在Windows中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循某人的指示,该人的存储库已克隆到我的机器上.我想要的很简单:能够在设置代码环境的过程中使用make命令.但是我使用的是Windows,我在网上搜索的唯一内容是找到要下载的make.exe文件,要下载的make-4.1.tar.gz文件(我下一步不知道该怎么做)以及有关下载MinGW(针对GNU;但是安装后,我没有提到"make").

I'm following the instructions of someone whose repository I cloned to my machine. What I want is simple: to be able to use the make command as part of setting up the code environment. But I'm using Windows, and I searched online only to find a make.exe file to download, a make-4.1.tar.gz file to download (I don't know what to do with it next), and things about downloading MinGW (for GNU; but after installing it I didn't find any mention of "make").

我不需要GNU编译器或相关的东西;我只想在Windows中使用"make".请告诉我该怎么做.

I don't want a GNU compiler or related stuff; I only want to use "make" in Windows. Please tell me what I should do to accomplish that.

提前谢谢!

推荐答案

make是GNU命令,因此在Windows上获得它的唯一方法是安装Windows版本,如 MinGW ,然后执行以下操作:

make is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Or you can install MinGW and then do:

copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe

或在PATH中创建指向实际可执行文件的链接.在这种情况下,如果您更新MinGW,则不会删除链接:

or create a link to the actual executable, in your PATH. In this case, if you update MinGW, the link is not deleted:

mklink c:\bin\make.exe C:\MinGW\bin\mingw32-make.exe

其他选项正在使用巧克力.首先,您需要安装此程序包管理器.安装完成后,您需要安装make:

Other option is using Chocolatey. First you need to install this package manager. Once installed you simlpy need to install make:

choco install make

最后一个选项是安装Windows Linux子系统(WSL),因此您将在Windows 10中嵌入自己选择的Linux发行版,可以在其中安装makegcc和构建C程序所需的所有工具.

Last option is installing a Windows Subsystem for Linux (WSL), so you'll have a Linux distribution of your choice embedded in Windows 10 where you'll be able to install make, gccand all the tools you need to build C programs.

这篇关于如何安装和使用"make"工具在Windows中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆