Eclipse:无法运行程序“make”(在目录“[path is given]”中)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19454668/
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
Eclipse: Cannot run program "make" (in directory "[path is given]")
提问by Belgi
I have Windows 64bit. I have installed Java 64bit and Eclipse 64bit.
我有 Windows 64 位。我已经安装了 Java 64 位和 Eclipse 64 位。
I have also installed MinGW located at C:\MinGW.
我还安装了位于 C:\MinGW 的 MinGW。
I have wrote a simple hello world project, but I am getting an error Cannot run program "make" (in directory "[path is given]")...
我写了一个简单的 hello world 项目,但出现错误无法运行程序“make”(在目录“[path is given]”中)...
What should I do ?
我该怎么办 ?
回答by Random
I stumbled upon your same problem and nothing I did seemed to work. But now I finally make it work. I'm answering just in case somebody passes through this post and ti somehow helps.
I tried through the command line first. I opened a command line, wrote make –version and that seemed to work, so I went to [path provided] and typed make all
. This gave me a windows error (some kind of error more like a javascript alert) telling me I didn't have zlib1.dll
我偶然发现了你同样的问题,我所做的一切似乎都没有用。但现在我终于让它工作了。我正在回答以防万一有人通过这篇文章并且我以某种方式有所帮助。我首先尝试通过命令行。我打开了一个命令行,写了 make –version 并且这似乎有效,所以我去了 [path provided] 并输入了make all
. 这给了我一个 Windows 错误(某种错误更像是一个 javascript 警报)告诉我我没有 zlib1.dll
After a lot of research in the net I downloaded this dll (because my mysys inside mingw didn't have it) from their web pageI just copy/pasted the dll inside the bin folder. This make the command line make all work. But no the eclipse one. I found a few solutions, like deleting the mingw make (there is a mingw-make.exe) or restarting a hundred time or changing from 64 to 32 bits (not an option for me), but nothing seemed to work. Until I found this in the eclipse forums.
在网上进行了大量研究后,我从他们的网页上下载了这个 dll(因为 mingw 中的 mysys 没有它),我只是将 dll 复制/粘贴到 bin 文件夹中。这使命令行使所有工作。但没有日食。我找到了一些解决方案,比如删除 mingw make(有一个 mingw-make.exe)或重新启动一百次或从 64 位更改为 32 位(对我来说不是一个选项),但似乎没有任何效果。直到我在eclipse 论坛中找到了这个。
It seems that in the c/c++ build --> builder settings --> uncheck ‘use default build command' and then in build command you put the path to the make.exe like in ‘C:\MinGW\msys\1.0\bin\make' it will work.
似乎在 c/c++ 构建 --> 构建器设置 --> 取消选中“使用默认构建命令”,然后在构建命令中将 make.exe 的路径放在“C:\MinGW\msys\1.0\”中bin\make' 它会起作用。
Of course you need to go to the tool chain editor (pending from the c/c++ build in the project properties) and change the current builder to GNU Make Build.
当然,您需要转到工具链编辑器(从项目属性中的 c/c++ 构建中等待)并将当前构建器更改为 GNU Make Build。
I hope this helps anybody that comes in the future!
我希望这对未来的任何人都有帮助!
Cheers!
干杯!
回答by jean-marc jobin
Had the same problem. I found that the path in the Eclipse C/C++ build environment was added correctly for the Make Build. Looking from Eclipse properties.
有同样的问题。我发现为Make Build正确添加了Eclipse C/C++构建环境中的路径。从 Eclipse 属性看。
If I ran make from the command line in my directory it failed!
如果我从我的目录中的命令行运行 make 它失败了!
I noticed that the path was not added in the Windows System Properties Environment Variable as expected. I added manually the 2 paths (Build Tools Folder and Tool Chain Folder) into the windows system and it worked.
我注意到该路径未按预期添加到 Windows 系统属性环境变量中。我手动将 2 个路径(构建工具文件夹和工具链文件夹)添加到 Windows 系统中,并且它工作正常。