eclipse 在 PATH 中找不到程序“make”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11579135/
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-09-10 21:12:01  来源:igfitidea点击:

Program "make" not found in PATH

eclipsemakefile

提问by aerlfredith

I'm having the Program "make" not found in PATH error in eclipse. I checked the path variable which is:

我在 Eclipse 的 PATH 错误中找不到程序“make”。我检查了路径变量,它是:

C:\cygwin\bin;
%JAVA_HOME%\bin;
%ANT_HOME%\bin;
%ANDROID_SDK%\tools;
%ANDROID_SDK%\platform-tools;
%ANDROID_NDK%;
%CommonProgramFiles%\Microsoft Shared\Windows Live;
C:\Program Files\NVIDIA Corporation\PhysX\Common;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Microsoft SQL Server0\Tools\Binn\;
C:\Program Files\Microsoft SQL Server0\DTS\Binn\;
C:\Program Files\Git\cmd

The PATHstarts with the folder which contains make (I checked and make.exeis in there), but eclipse still goes Program "make" not found in PATH.

PATH与含有能使(我查了一下文件夹开始make.exe就在那里),但日食仍然去Program "make" not found in PATH

I have tried changing the path and restarting several times but nothing seems to change.

我试过改变路径并重新启动几次,但似乎没有任何改变。

回答by Wojciech Fornal

You may try altering toolchain in case if for some reason you can't use gcc. Open Propertiesfor your project (by right clicking on your project name in the Project Explorer), then C/C++ Build> Tool Chain Editor. You can change the current builder there from GNU Make Builderto CDT Internal Builderor whatever compatible you have.

如果由于某种原因您无法使用 gcc,您可以尝试更改工具链。打开您的项目的属性(通过在Project Explorer 中右键单击您的项目名称),然后C/C++ Build> Tool Chain Editor。您可以将当前的构建器从GNU Make Builder更改为CDT Internal Builder或任何兼容的构建器

回答by Serge Voloshenko

Are you trying to run "Hello world" for the first time? Please make sure you choose proper toolchain. For Windows you have to choose MinGW GCC. enter image description here

您是第一次尝试运行“Hello world”吗?请确保您选择了正确的工具链。对于 Windows,您必须选择 MinGW GCC。 在此处输入图片说明

To make MinGW GCC compiler as default or change you original project with error "Program “make” not found in PATH" or "launch failed binary not found eclipse c++" when you trying to run program simply go to Windows >> Preferences >> C\C++ Build >> Tool Chain Editor >> Change Current toolchain to MinGW GCC

要将 MinGW GCC 编译器设为默认值或更改原始项目并在尝试运行程序时出现错误“Program “make” not found in PATH”或“launch failed binary not found eclipse c++”,只需转到 Windows >> Preferences >> C \C++ 构建 >> 工具链编辑器 >> 将当前工具链更改为 MinGW GCC

enter image description here

在此处输入图片说明

回答by pa1

If you are using MinGw, rename the mingw32-make.exe to make.exe in the folder " C:\MinGW\bin " or wherever minGw is installed in your system.

如果您使用的是 MinGw,请将 mingw32-make.exe 重命名为“C:\MinGW\bin”文件夹中或系统中安装 minGw 的任何位置中的 make.exe。

回答by shieldgenerator7

In MinGW, I had to install the following things:

在 MinGW 中,我必须安装以下东西:

Basic Setup -> mingw32-base  
Basic Setup -> mingw32-gcc-g++  
Basic Setup -> msys-base 

And in Eclipse, go to

在 Eclipse 中,转到

Windows -> Preferences -> C/C++ -> Build -> Environment

And set the following environment variables (with "Append variables to native environment" option set):

并设置以下环境变量(设置“将变量附加到本机环境”选项):

MINGW_HOME   C:\MinGW
PATH   C:\MinGW\bin;C:\MinGW\msys.0\bin

Click "Apply" and then "OK".

单击“应用”,然后单击“确定”。

This worked for me, as far as I can tell.

据我所知,这对我有用。

回答by Dolan Antenucci

Just to clarify the details that Adel's linked eclipse forum covers, here's how I solved this (on OS X):

只是为了澄清 Adel 的链接 eclipse 论坛涵盖的细节,这是我解决这个问题的方法(在 OS X 上):

Note: for me, even though my personal environment (i.e. if in bash, echo $PATH) had /Developer/usr/bin in it, I still had to add it to Eclipse's Environment variables:

注意:对我来说,即使我的个人环境(即如果在 bash 中,echo $PATH)中有 /Developer/usr/bin,我仍然必须将它添加到 Eclipse 的环境变量中:

Go to Eclipse Preferences -> C/C++ -> Build -> Environment -> Add.. -> "${PATH}:/Developer/usr/bin"

Eclipse Preferences -> C/C++ -> Build -> Environment -> Add.. -> "${PATH}:/Developer/usr/bin"

In the case of some other OS, just use the right path where make exists.

在某些其他操作系统的情况下,只需使用 make 存在的正确路径。

回答by user2452561

If you are using MinGW toolchain for CDT, make.exe is found at C:\MinGW\msys\1.0\bin

如果您使用 MinGW 工具链进行 CDT,则 make.exe 位于 C:\MinGW\msys\1.0\bin

(or search the make.exe in MinGW folder.)

(或在 MinGW 文件夹中搜索 make.exe。)

Add this path in eclipse window->preferences->environment

在eclipse window->preferences->environment中添加这个路径

回答by Elliot Chen

Make sure you have installed 'make' tool through Cygwin's installer.

确保您已经通过 Cygwin 的安装程序安装了“make”工具。

回答by Motla

If you are using GNU MCU Eclipse on Windows, make sure Windows Build Toolsare installed, then check the installation path and fill the "Global Build Tools Path" inside Eclipse Window/Preferences... :

如果您在 Windows 上使用 GNU MCU Eclipse,请确保安装了Windows Build Tools,然后检查安装路径并在 Eclipse Window/Preferences... 中填写“Global Build Tools Path”:

Global Build Tools Path

全局构建工具路径

回答by Fabio Benigno

Probably there are some files inside C:\cygwin\bin called xxxxxmake.exe, try renaming it to make.exe

可能里面有一些文件C:\cygwin\bin called xxxxxmake.exe,尝试将其重命名为make.exe

回答by Fooo

I had the same problem. Initially I had setup Eclipse CDT with Cygwing & was working smoothly. One day there happened a problem due to which I had to reset windows. After that when I opened Eclipse I started facing the issue described above. This is how I solved it.

我有同样的问题。最初我用 Cygwing 设置了 Eclipse CDT,并且工作顺利。有一天发生了一个问题,我不得不重置窗口。之后,当我打开 Eclipse 时,我开始面临上述问题。我就是这样解决的。

First I searched that in the error the PATH variable value is same as the PATH variable of windows ( just by manual comparison of both two values ). I found that to be same. Now I realized that it is a PATH problem.

首先,我在错误中搜索到 PATH 变量值与 windows 的 PATH 变量相同(仅通过手动比较两个值)。我发现那是一样的。现在我意识到这是一个 PATH 问题。

Then started looking for Cygwin whether it is there or not? It was there. I located & found that it exists in

然后开始寻找 Cygwin 是否存在?它在那里。我找到并发现它存在于

C:\cygwin64\bin>
C:\cygwin64\bin>dir ma*
 Volume in drive C is Windows8_OS
 Volume Serial Number is 042E-11B5

 Directory of C:\cygwin64\bin

16-05-2015  18:34            10,259 mag.exe
13-08-2013  04:57               384 mailmail
11-04-2015  02:56             4,252 make-emacs-shortcut
15-02-2015  23:25           194,579 make.exe
04-05-2015  21:36            40,979 makeconv.exe
29-07-2013  11:57            29,203 makedepend.exe
16-05-2015  18:34            79,891 makeindex.exe
16-05-2015  18:34            34,323 makejvf.exe
07-05-2015  03:04               310 mako-render
18-04-2015  02:07            92,179 man.exe
18-04-2015  02:07           113,683 mandb.exe
13-08-2013  04:57               286 manhole
18-04-2015  02:07            29,203 manpath.exe
24-10-2014  13:31           274,461 mate-terminal.exe
24-10-2014  13:31             1,366 mate-terminal.wrapper
              15 File(s)        905,358 bytes
               0 Dir(s)  373,012,271,104 bytes free

C:\cygwin64\bin>

Then I simply went ahead & updated the PATH variable to include this path & restarted eclipse.

然后我只是继续更新 PATH 变量以包含此路径并重新启动 eclipse。

The code compiles & debugging (GDB ) is working nicely.

代码编译和调试 (GDB) 运行良好。

Hope this helps.

希望这可以帮助。