Reputation: 89
I've been googling for about 2 days. Read and followed a lot of instructions but nothing worked for me (including some instructions in this website; I know that people already asked this question in here). I've downloaded Eclipse, installed the C/C++ plugin (window 7, 64 bit) but when I run the HelloWorld.c
program, I get a pop-up message saying:
Launch Failed. Binary Not Found.
Here is what I have done in Eclipse:
Here are steps I used to create the project:
Right click on Hello-->new-->Source File, enter HelloWorld.c, then click Finish button. enter the code below:
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
return 0;
}
Save and click on the "Hammer" icon to build project. then I got this message:
make all
Cannot run program "make": Launching failed
Error: Program "make" not found in PATH PATH=[C:\eclipse_Juno;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
21:35:25 Build Finished (took 280ms)
I am not sure what I did wrong. Please point out why I am not able to run my program in Eclipse. Thanks in advance.
Upvotes: 6
Views: 11370
Reputation: 783
I had the same problem minutes ago. Do this:
Write your program, like:
#include <stdio.h>
int main(){
printf("Hello There\n");
printf("salam");
}
Then press Ctrl + B for Build All
. You can do this from Project -> Build All
.
Then, go to Run -> Run Configuration
and on the left menu, double click on C/C++ Application
(1), then click on the new opened option: "Sth Debug"(2). Now, on the main window, under C/C++ Application:
, under the edittext, click browse
option(3). Open your workspace, open your project, open Debug
folder (which is created after each build), and select your a file with the same name as ProjectFolderName
, then click Run
(8).
Important Note:
Just select the file with the same name as ProjectFolderName
without any suffix. Don't choose the files ending like: sth.d
or sth.o
. Just select file which has no suffix.
Important Note2:
You can put ${workspace_loc}/${project_name}/Debug/${project_name}
in the edittext too, but if you are using Windows, use backslashes() instead of slashes(/).
Upvotes: 3
Reputation: 19
Let me put it simple for you in steps.
Problem Explanation:
Upvotes: 0
Reputation: 5022
The problem was that no compiler was installed, and that eclipse is an integrated development environment which doesn't integrate a compiler natively.
Upvotes: 2