错误:当我尝试在 Eclipse 中构建 C 项目时,在 PATH 中找不到程序“make”

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

Error: Program "make" not found in PATH when I try to build C project in eclipse

ceclipse

提问by 500004dolkong

I am trying to build any C project using eclipse.

我正在尝试使用 eclipse 构建任何 C 项目。

I installed CDT plugin and Mingw.

我安装了 CDT 插件和 Mingw。

However I cannot build a C project because of following error.

但是,由于以下错误,我无法构建 C 项目。



14:29:16 **** Incremental Build of configuration Default for project C_Test_02 ****
make all 
Cannot run program "make": Launching failed

Error: Program "make" not found in PATH
PATH=[C:\MinGW\bin;C:\Klocwork\User 9.5\bin;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\OpenCL SDK.0\bin\x86;C:\PROGRA~1\ULTRAE~1;C:\utils\checkstyle;C:\MinGW\bin;C:\Klocwork\User 9.5\bin;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\ProgramFiles\Intel\OpenCL SDK.0\bin\x86;C:\PROGRA~1\ULTRAE~1;C:\utils\checkstyle]


I added C:\MinGW\bin to my environmental path. But 'make' is not in C:\MinGW\bin. I think the error occurs because C:\MinGW\bin doesn't include 'make' although I followed the Eclipse FAQ to build C project. I can find only gcc(s), automake(s), mingw32-make(s).... in C:\MinGW\bin.

我将 C:\MinGW\bin 添加到我的环境路径中。但是“make”不在 C:\MinGW\bin 中。我认为发生错误是因为 C:\MinGW\bin 不包含“make”,尽管我按照 Eclipse FAQ 来构建 C 项目。我只能在 C:\MinGW\bin 中找到 gcc(s)、automake(s)、mingw32-make(s)....

Could you let me know how I can get 'make'?

你能告诉我如何获得'make'吗?

UPDATE

更新

I founded 'make' file. refer to comments below) But a makefile isn't generated automatically. Properties>C/C++ Build>Builder Settings 'Generate Makefiles Automatically' option is diabled.

我创建了'make'文件。请参阅下面的评论)但不会自动生成生成文件。Properties>C/C++ Build>Builder Settings 'Generate Makefiles Automatically' 选项被禁用。

Could you let me know how I can enable this option?

你能告诉我如何启用这个选项吗?

回答by Questioner

Create a copy of the mingw32-make exe. Rename mingw32-make to make. Include the path to the executable in PATH variable. Solved my issue.

创建 mingw32-make exe 的副本。将 mingw32-make 重命名为 make。在 PATH 变量中包含可执行文件的路径。解决了我的问题。

回答by Jumabek Alikhanov

First, remove the eclipse CDT. To install C/C++ compiler and Eclipse follow the instructions on this link https://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html

首先,删除eclipse CDT。要安装 C/C++ 编译器和 Eclipse,请按照此链接https://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html上的说明进行操作

If still no success follow the @Questioner's answer.

如果仍然没有成功,请按照@Questioner 的回答进行操作。

回答by AnkitSahu

Already Solved this problem. Please follow this page

已经解决了这个问题。请关注此页面

Program "make" not found in PATH

在 PATH 中找不到程序“make”

You may try altering toolchain in case if for some reason you can't use gcc. Open Properties for 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 Builder to CDT Internal Builder or whatever compatible you have.

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