6

我试图使用 Eclipse 在我的 Windows 7 计算机上运行 ac 程序,但我遇到了一个小障碍。我目前使用 CDT 插件在我的计算机上下载了 Eclipse,我还下载了 Mingw 并将其设置为我的路径。当我构建我的简单“Hello world”程序时,它确实创建了一个带有 makefile 的调试文件以及其中的所有内容,但 concle 对话框状态

**** Build of configuration Debug for project C_Test ****

make all 

`Cannot run program "make" (in directory "C:\Users\Chmoder\workspace\C_Test\Debug"): CreateProcess error=2, The system cannot find the file specified Error: Program "make" is not found in PATH

PATH=[C:\Users\Chmoder\Downloads\eclipse;C:\MINGW\Bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared \Windows Live;C:\Program Files (x86)\ATI Stream\bin\x86_64;C:\Program Files (x86)\ATI Stream\bin\x86;C:\Windows\system32;C:\Windows;C: \Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\ Common Files\Roxio Shared\DLLShared\;c:\Program Files (x86)\Common Files\Roxio Shared\12.0\DLLShared\;C:\Program Files (x86)\Windows Live\Shared]`

此外,当我在构建程序后尝试运行程序时,它显示“找不到二进制文件”

任何帮助的人?

4

5 回答 5

6

另一种解决方案是在 eclipse.ini 中设置 MINGW_HOME 变量:

-DMINGW_HOME=C:\Program Files (x86)\CodeBlocks\MinGW

这样可以避免更改系统 PATH(通常需要管理员权限)

在 eclipse / CDT 的帮助下建议的解决方案)

于 2012-12-10T10:44:53.067 回答
4
于 2011-08-20T20:11:05.773 回答
0

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

转到 Eclipse 首选项 -> C/C++ -> 环境 -> 添加.. -> "${PATH}:/Developer/usr/bin

在 cygwin 的情况下,您只需将正确的目录放在 where makeis。

这让我感到困惑,所以想分享对我有帮助的细节。:)

来源:通过Adel 在另一个 SO 帖子上发布的 Eclipse 论坛帖子。

于 2012-09-19T17:05:17.457 回答
0
  • 转到“窗口”->“首选项”->“C++”->“构建”->“环境”
  • 添加“命令”=“c:\mingw\bin\make.exe”`。
  • 另一方面,您需要一个批处理文件"c:\mingw\bin\rm.bat"
  • 在该文件中,输入:

    @echo off
    :start
        if "%1" == "" goto end
        if "%1" == "-f" goto loop
        del %1
    :loop
        shift
        goto start
    :end
    
于 2013-11-19T05:08:27.887 回答
0

我对 eclipse Luna 版本有同样的问题。

我什至无法编译嵌入在 IDE 中的“Hello World”示例。它一直说即使在路径中也找不到make文件。

我尝试了这个论坛中的每一个建议(确保路径在 Windows 和 Eclipse 变量中,并制作 rm.bat 文件)但没有任何帮助。

我所做的是从 C:\MINGW\msys\1.0\Bin 复制 make.exe 并将其粘贴到 eclipse.exe 所在的文件夹中。这可能不是最佳解决方案,但它解决了它。

于 2014-10-14T01:44:08.380 回答