Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't even get the pre-made HelloWorld to work
Can't even get the pre-made HelloWorld to work [message #1095418] Tue, 27 August 2013 03:11 Go to next message
Johnson Joe is currently offline Johnson JoeFriend
Messages: 5
Registered: August 2013
Junior Member
So, first let me just say I've used Eclipse for Java for several years, but now that I'm trying to get to learn C++, it's all confusion.

I went ahead and installed all the packages I need from MinGW, and went through the Eclipse help topic about setting up, building, and running the example HelloWorld program.

There aren't any errors or anything, but when I run it, the Console goes straight to terminated, I don't see anything print.

I'm just so confused. There's a lot more stuff to do to get a simple program running than I'm used to from Java.
Re: Can't even get the pre-made HelloWorld to work [message #1097304 is a reply to message #1095418] Thu, 29 August 2013 14:11 Go to previous messageGo to next message
Dale Fernandes is currently offline Dale FernandesFriend
Messages: 1
Registered: August 2013
Junior Member
Dear Johnson Joe

One should normally provide the code for problems as it is now impossible to see where you could've gone wrong, lucky it is a simple task and can be accomplished like so:

//A header that includes I don't know what but it does seem to be required as it is in every newly created document Smile
#include "stdafx.h"

//Provides standard input output methods
#include <iostream>

//Allows the calling of functions within the iostream (As far as I know this is how it works)
using namespace std;

int main()
//Outputs Hello world! to the console. the "endl" function moves the cursor to the next line.
cout << "Hello world!" << endl;

//Prevents the console from self-terminating and presents the user with the "Press any key to continue..." scenario.

//Returns a value of 0 which normally means the program executed successfully.
return 0;
Re: Can't even get the pre-made HelloWorld to work [message #1098079 is a reply to message #1095418] Fri, 30 August 2013 15:30 Go to previous message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 220
Registered: July 2009
Senior Member
Try adding the MinGW bin path to the PATH env variable, typically C:\MinGW\bin. See
Previous Topic:Eclipse RDT server crashes with read timed out
Next Topic:Ant in Eclipse C++ Bundle
Goto Forum:

Current Time: Mon Jun 25 14:19:31 GMT 2018

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

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

Back to the top