Eclipse CDT 错误:“制作:*** [src/test2.o] 错误 127”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3485941/
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 CDT error: "make: *** [src/test2.o] Error 127"
提问by JnBrymn
On Windows XP I've installed Eclipse CDT. I've installed cygwin including make, gcc, g++, and gdb. I've added C:\cygwin\bin to the windows path variable.
在 Windows XP 上,我安装了 Eclipse CDT。我已经安装了 cygwin,包括 make、gcc、g++ 和 gdb。我已将 C:\cygwin\bin 添加到 Windows 路径变量中。
When I create the default HelloWorld project in Eclipse and try to build, I get the following text in the console:
当我在 Eclipse 中创建默认的 HelloWorld 项目并尝试构建时,我在控制台中收到以下文本:
make all
make: echo: Command not found
make: *** [src/test3.o] Error 127
使所有
制作:回声:找不到命令
制作:*** [src/test3.o] 错误 127
If I try make at the command line, then all's well.
如果我在命令行尝试 make ,那么一切都很好。
Other clues:
其他线索:
- Note that I added C:\cygwin\bin to the path rather than C:\cygwin\usr\bin because I didn't find my GNU toolchain in \usr\bin but in \bin. This seems to contradict some online documentation. Stranger still, when I type
which make
in the command window (not cygwin bash), it reads /usr/bin/make ! - I might have installed a new version of cygwin over an old version. I noticed some warnings about this, but since nothing seemed to be wrong with cygwin once complete (and further, since make from the cygwin bash works ok), I didn't dig deeper here.
- 请注意,我在路径中添加了 C:\cygwin\bin 而不是 C:\cygwin\usr\bin,因为我没有在 \usr\bin 中找到我的 GNU 工具链,而是在 \bin 中。这似乎与一些在线文档相矛盾。更奇怪的是,当我
which make
在命令窗口(不是 cygwin bash)中键入时,它会读取 /usr/bin/make ! - 我可能在旧版本上安装了新版本的 cygwin。我注意到了一些关于此的警告,但是由于 cygwin 完成后似乎没有任何问题(而且,由于来自 cygwin bash 的 make 工作正常),我没有在这里深入挖掘。
(Note: there is a related questionthat I didn't find helpful. Perhaps it's answer was over my head.)
(注意:有一个相关的问题我觉得没有帮助。也许它的答案超出了我的头脑。)
回答by Lucas A.
I had the same problem using Eclipse CDT (Juno) under Lubuntu 12.10.
我在 Lubuntu 12.10 下使用 Eclipse CDT (Juno) 遇到了同样的问题。
The following fixed it:
以下修复了它:
- Terminal: executed which make--> /usr/bin/make
- Terminal: executed which echo--> /bin/echo
- Eclipse: Under Project Properties > C/C++ Build > Environment, I made sure the contents of the PATHvariable were /usr/bin:/bin, this is, the full path for makeand echo, respectively.
- 终端:执行which make--> /usr/bin/make
- 终端:执行which echo--> /bin/echo
- Eclipse:在Project Properties > C/C++ Build > Environment 下,我确保PATH变量的内容是/usr/bin:/bin,这分别是make和echo的完整路径。
回答by G3NTL3
On WINDOWSThis work for me after setting your variable PATHtry to do this PROJECT-->C/C++ BUILD-->TOOL CHAIN EDITOR-->then change the CURRENT BUILDERTO CDT INTERNAL BUILDERHope it works.
在WINDOWS设置您的变量后,这项工作对我来说PATH尝试做这个 项目- > C / C ++ BUILD - >工具链编辑器- >然后更改 当前的BuilderTO CDT内部BUILDER希望工程。
回答by Borealid
The problem is that there is no echo
binary in your PATH. Locate echo
, and add it to your PATH environment variable.
问题是echo
您的 PATH 中没有二进制文件。找到echo
,并将其添加到您的 PATH 环境变量中。
回答by JnBrymn
It works! I completely reinstalled cygwin and left the pathing the way I had it and Eclipse CDT compiles the hello world program. Something important in the last cygwin major update must have changed.
有用!我完全重新安装了 cygwin 并保留了路径,Eclipse CDT 编译了 hello world 程序。上次 cygwin 主要更新中的一些重要内容一定发生了变化。
回答by Pedro Gordo
Reinstalling Cygwin also worked for me. Turns out I needed to install it as an administrator. :-)
重新安装 Cygwin 也对我有用。原来我需要以管理员身份安装它。:-)
回答by user2971399
I had the same problem using eclipse. Also a debug directory was created there and it had an error too. I deleted debug directory and I right click on project directory and select "Build Project". Then every thing just fixed.
我在使用 eclipse 时遇到了同样的问题。在那里还创建了一个调试目录,它也有错误。我删除了调试目录,然后右键单击项目目录并选择“构建项目”。然后一切都刚刚好。