Eclipse CDT plugin problems
Asked Answered
G

5

6

im trying to run a c program on my windows 7 computer using eclipse and im running into a little snag. I currently have Eclipse downloaded on my computer with the CDT plugin and i have also downloaded Mingw and set it to my path. When i build my simple "Hello world" program it does create a debug file with the makefile and everything in it but the concle dialog states

**** 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]`

Also, when i try to run my program after building it, it says "Binary not found"

any help people?

Galway answered 20/8, 2011 at 19:59 Comment(2)
Did you download and install a "msys" ? Make utility is not part of mingw, but part of related msys.Palaeozoology
Rename your mingw32-make.exe to make.exe .Procryptic
P
6

Another solution is to set the MINGW_HOME variable in eclipse.ini :

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

This avoid to change the system PATH (often requires administrator rights)

(solution suggested by help of eclipse / CDT)

Plaything answered 10/12, 2012 at 10:44 Comment(0)
P
4

The error is: there is no make in %PATH. Make is UNIX utility to help building a projects. For windows OS, the make utility is part of msys, not of mingw32.

According to your path and to my setup of mingw and msys, you have no msys installed (or the path of Msys was not recorded in system %PATH variable).

For you, msys will be like this path in $PATH variable:

  C:\MINGW\msys\1.0\Bin;

Msys can be downloaded from http://www.mingw.org/ too.

If you did a download of universal installer (it is the easiest variant), you just should check, is there a make.exe file in the C:\MINGW\msys\1.0\Bin directory and add this directory to the system PATH variable.

Palaeozoology answered 20/8, 2011 at 20:11 Comment(2)
How do fix mine if I am using Cygwin?Bordelaise
Find a make utility in cygwin installation directory and add folder with make to PATHPalaeozoology
F
0

For me (on OS X), even though my personal environment (i.e. if in bash, echo $PATH) had /Developer/usr/bin in it, I still had to add it to Eclipse's Environment variables:

Go to Eclipse Preferences -> C/C++ -> Environment -> Add.. -> "${PATH}:/Developer/usr/bin

In the case of cygwin, you'd just put the right directory to where make is.

This was confusing for me, so figured share the details that helped me. :)

source: eclipse forum post via Adel on another SO post.

Forkey answered 19/9, 2012 at 17:5 Comment(0)
O
0
  • Goto "Window"->"Prefenerces"->"C++"->"Build"->"Environment"
  • add "COMMAND"="c:\mingw\bin\make.exe"`.
  • on the other side, you need a batch file "c:\mingw\bin\rm.bat"
  • In that file, put:

    @echo off
    :start
        if "%1" == "" goto end
        if "%1" == "-f" goto loop
        del %1
    :loop
        shift
        goto start
    :end
    
Obstruction answered 19/11, 2013 at 5:8 Comment(0)
D
0

I had the same problem with eclipse Luna version.

I could not even compile the "Hello World" example that comes embedded in the IDE. It kept saying that make file was not found in the path even though it was.

I tried every suggestion in this forum (making sure the path was in Windows and Eclipse variables, and making the rm.bat file) but nothing helped.

What I did is that I copied make.exe from C:\MINGW\msys\1.0\Bin and paste it into the folder where eclipse.exe resides. This might not be the optimal solution but it solved it.

Doublure answered 14/10, 2014 at 1:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.