Can't get eclipse for C++ to run program [message #1304687] |
Sun, 20 April 2014 01:31 |
Felicity Beeson Messages: 6 Registered: June 2012 |
Junior Member |
|
|
Hi,
I am experienced with eclipse for Java development; have been using it since at least calypso.
I downloaded and installed MinGW: downloaded mingw-get-setup.exe and ran it; I selected everything it would let me select to install in two windows and Applied Changes; I now have a C:/MinGW folder; my PATH includes ...\;C:\MinGW\mingw32\bin\; -the last entry.
I downloaded eclipse-java-kepler-SR2-win32-x86_64.zip and extracted it. I ran it.
I created File>New>Project>C++ Project>Project Type>Executable>Empty Project and created a project called GoodbyeWorld. The Toolchains window showed Cross GCC, Microsoft Visual C++, and MinGW GCC; I select MinGW GCC. The Select Configurations page showed Project type: Executable, Toolchains: MinGW GCC and had both Debug and Release checked; I finished and the project was created.
I add a source .cpp file called GoodbyeWorld.cpp, Template: Default C++ source template; I put the following code in it:
/*
* helloworld.cpp
*
* Created on: Apr 19, 2014
* Author: Ms Phelix
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Goodbye World!";
return 0;
}
I built the project: Project>Build Project; it built without any message I could interpret as an error or failure. Project Explorer now shows:
GoodbyeWorld
Binaries
Includes
Debug
GoodbyeWorld.cpp
I ran it: Run>Run; nothing happened; I was looking in the Console view for it to say Goodbye World! but it didn't; it immediately said <terminated>.
I put a breakpoint on the cout line and debugged it: Run>Debug; it stopped on the breakpoint and when I hit F8 to resume, it flashed something so fast I couldn't see what it said and I couldn't scroll up to see what it had said.
What was still visible was
either
Goodbye World!=thread-exited,id="1",group-id="i1"
or
The target endianness is set automatically (currently little endian)
[New Thread 5768.0x12b8]
Quit (expect signal SIGINT when the program is resumed)
Can you please help me get this working?
Thank you.
[Updated on: Sun, 20 April 2014 01:32] Report message to a moderator
|
|
|
|
|
Re: Can't get eclipse for C++ to run program [message #1305938 is a reply to message #1305063] |
Sun, 20 April 2014 18:44 |
Felicity Beeson Messages: 6 Registered: June 2012 |
Junior Member |
|
|
Thank you for replying so quickly.
After a little research on setvbuf(), I changed my code and built and ran it. Again I got no response when I ran it and got a different response when I debugged it.
I have attached an image of eclipse after debugging to let you see it. (I can't see anything to tell me it was successfully attached so let me know if it's not there.)
Any other ideas?
Thank you.
[Updated on: Sun, 20 April 2014 22:06] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02936 seconds