eclipse 无法运行程序“make”:系统找不到指定的文件?

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

Cannot run program "make": The system cannot find the file specified?

ceclipsemakefileeclipse-cdt

提问by Mohit Deshpande

This is the first time that this error has come up. I am using Cygwin with Eclipse 3.5 and my Path variable is set to: %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Apache Ant\bin;C:\Program Files\SVN\bin;C:\Program Files\Java\jdk1.6.0_18\bin;C:\Users\Mohit\Developer\AndroidSDK\tools;C:\Program Files\QuickTime\QTSystem\;C:\cygwin\binNotice that C:\cygwin\binis in my Path. And make.exe is is my Cygwin bin. So I think the problem is not with my system, but maybe my project. But I can't find anything wrong with it. Any suggestions?

这是第一次出现此错误。我在 Eclipse 3.5 中使用 Cygwin,并且我的 Path 变量设置为:%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Apache Ant\bin;C:\Program Files\SVN\bin;C:\Program Files\Java\jdk1.6.0_18\bin;C:\Users\Mohit\Developer\AndroidSDK\tools;C:\Program Files\QuickTime\QTSystem\;C:\cygwin\bin注意C:\cygwin\bin在我的路径中。而 make.exe 是我的 Cygwin bin。所以我认为问题不在于我的系统,而可能是我的项目。但我找不到任何问题。有什么建议?

回答by Adam Rosenfield

Use Process Explorerto take a look at the PATH environment variable inside Eclipse's process. It's possible that it's changing its PATH internally -- if that's the case, you'll need to figure out how to configure Eclipse so that its PATH is set up correctly.

使用Process Explorer查看 Eclipse 进程中的 PATH 环境变量。它有可能在内部更改其 PATH —— 如果是这种情况,您需要弄清楚如何配置 Eclipse 以便正确设置其 PATH。

If you're finding that C:\cygwin\binisn't in Eclipse's PATH, and you recently added that to your PATH, you need to close and restart Eclipse for that change to take affect.

如果您发现它C:\cygwin\bin不在 Eclipse 的 PATH 中,并且您最近将它添加到了 PATH,则需要关闭并重新启动 Eclipse 以使该更改生效。

If you still can't figure it out, try using Process Monitorwith a filter for Eclipse.exe to get a long, detailed listing of everything it's trying to do. Look for the call to CreateProcess()that's failing and see if you can learn anything more.

如果您仍然无法弄清楚,请尝试使用带有 Eclipse.exe 过滤器的Process Monitor,以获得它尝试执行的所有操作的长而详细的列表。寻找CreateProcess()失败的电话,看看您是否可以了解更多信息。

回答by Amin Abdiyan Mobarakeh

I had same problem and I solved that copy make.exe file in path that ecilipse given. from link below http://www.mediafire.com/download/e9j9g4zun2t68jn/make.exehope helps

我遇到了同样的问题,我解决了 ecilipse 给出的路径中的复制 make.exe 文件。从下面的链接 http://www.mediafire.com/download/e9j9g4zun2t68jn/make.exe希望有所帮助

回答by Cloud Cho

I go around this issue by installing MinGW and use its GCC compiler.

我通过安装 MinGW 并使用其 GCC 编译器来解决这个问题。

Environment - OS: Windows 10, Eclipse: Oxygen

环境 - 操作系统:Windows 10,Eclipse:氧气