Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C++ in Eclipse - From the beginning(This topic is establish to be explained what to do in the first steps to run and debug a Project/Source File)
C++ in Eclipse - From the beginning [message #1781297] Mon, 05 February 2018 18:20 Go to next message
Andor Balázs is currently offline Andor BalázsFriend
Messages: 1
Registered: February 2018
Junior Member
Dear All,

I installed the eclipse cpp Oxygen.
I followed the instruction of a Lynda.com training how to run and debug a program.

< Please be aware that according to this: we should install the eclipse, the Java environment and something from the www.equation.com, it is called GCC(not existing anymore) Instead of this I installed MiniGW>


I chose a simple program to test it.
(1) I created a Project *New Project>>C/C++ Project (NEXT) C++ Managed Build (NEXT) Project name: Training
Toolchains Cross GCC (But here I can also choose MiniGW GCC) (FINISH)*
(2) I choose now a basic script, this one:
---------------------------
#include <iostream>
using namespace std;

int main()
{
cout << "Hello, World!";
return 0;
}
-----------------------------

(3) Then I click 'Run' and it is showing this error message:
"Launch failed. Binarz not found."
index.php/fa/32006/0/


1. I tried to find the solution with several way.
'Run Configurations..'
I tried to name a file and then choose it from here.
I tried it several way.




Please help me in that because it is important for me. Thank you in advance!
Andor
Re: C++ in Eclipse - From the beginning [message #1781411 is a reply to message #1781297] Wed, 07 February 2018 01:34 Go to previous message
David VavraFriend
Messages: 756
Registered: October 2012
Senior Member
You can only run executables.
You have to compile the source then link the resultant object files along with system libraries to produce an executable.
This is called "Building".
To build either
1) use the hammer icon in the upper left of the toolbar
after using the down arrow next to it to select the configuration

or 2) select Project --> Build Project from the menu
you define which configuration to build with menu Project --> Build Configurations --> Set Active

The "Debug" configuration will add debugging information during the compile that is needed by the debugger.

Note that Eclipse only creates a makefile which is used by Make to build the executable.
You should read some tutorials on using Make and GCC.
For example, https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html
If you don't know how to build executables without Eclipse then what Eclipse does will likely remain a mystery to you.

Previous Topic:Wrongly marked as unresolved
Next Topic:The CDT Simulate enter abnormal state.
Goto Forum:
  


Current Time: Mon Aug 20 15:19:34 GMT 2018

Powered by FUDForum. Page generated in 0.01523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top