Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » HelloWorld stopped working(Quick starter question)
HelloWorld stopped working [message #698152] Mon, 18 July 2011 22:12 Go to next message
Albert  is currently offline Albert Friend
Messages: 1
Registered: July 2011
Junior Member
I recently installed eclipse CDT, and was trying to learn how it worked through making a simple HelloWorld program as described by the help section. It builds fine and without error, but it does not run. When I select the option to run it, I get the error "This program has stopped working" from windows... In the output on the bottom it says that it is running until it is closed by windows. Windows then tells me that it has "Stopped working unexpectedly," or along those lines. I am wondering if this is a common problem with a common fix? Or something different? Your help is much appreciated.
Re: HelloWorld stopped working [message #698293 is a reply to message #698152] Tue, 19 July 2011 08:23 Go to previous messageGo to next message
malo_nj  is currently offline malo_nj Friend
Messages: 33
Registered: December 2010
Member
Its more likely you are missing something, then that you have some common problem. Try running the application directly from windows. Did you try the Debug launch or Run launch? Also what tool-chain are you using mingw or cygwin gcc?

[Updated on: Tue, 19 July 2011 08:58]

Report message to a moderator

Re: HelloWorld stopped working [message #713075 is a reply to message #698152] Mon, 08 August 2011 04:25 Go to previous messageGo to next message
isaac.noble is currently offline isaac.nobleFriend
Messages: 1
Registered: August 2011
Junior Member
I am having the exact same problem. I installed eclipse indigo c++, installed mingw, msys, and gdb. I set the enviroment PATH variable to include both mingw and msys. I created the default hello world program built it successfully, but when I try to run it I get a windows message telling me the program has stopped working. I can debug the program within eclipse and it runs from the command line, just not when I run it without debugging in eclipse.

Eclipse Info:
Eclipse IDE for C/C++ Developers

Version: Indigo Release
Build id: 20110615-0604

Other Programs:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\zebra>g++ --version
g++ (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


C:\Users\zebra>gcc --version
gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


C:\Users\zebra>gdb --version
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".

C:\Users\zebra>make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-msys

C:\Users\zebra>
Re: HelloWorld stopped working [message #716338 is a reply to message #713075] Wed, 17 August 2011 05:43 Go to previous messageGo to next message
Michael Slivinski is currently offline Michael SlivinskiFriend
Messages: 1
Registered: August 2011
Junior Member
Try project>properties>run/debug settings click the project in the window select edit and make sure the check-box next to path is checked. This is what fixed the same problem for me.
Re: HelloWorld stopped working [message #716670 is a reply to message #716338] Thu, 18 August 2011 03:44 Go to previous messageGo to next message
Cassandra  is currently offline Cassandra Friend
Messages: 2
Registered: August 2011
Junior Member
I am having the same problem, but the fixes posted are not working for me. I have windows vista, installed cygwin, added c:\cygwin\bin to my path, installed Eclipse and all the updates I can possibly think of, and I can't figure out what my problem is. I build the HelloWorld thing, and it works when I run it form the command line, but it won't work for Eclipse.
When I try the debugger it gives me this message:

Can't find a source file at "/cygdrive/c/Users/Owner/cppworkspace/HelloWorldProject/src/HelloWorldProject.cpp"
Locate the file or edit the source lookup path to include its location.

This is obviously a bad path, but I don't know why it is getting this path. How do I "edit the source lookup path"?
Re: HelloWorld stopped working [message #716702 is a reply to message #698152] Thu, 18 August 2011 07:07 Go to previous messageGo to next message
Kyle Hoogervorst is currently offline Kyle HoogervorstFriend
Messages: 1
Registered: August 2011
Junior Member
this is also happening to me, build fine, then run and .exe stops working. michael which box u talking? michael which box u talking about? "select configuration using c\c++ app"? if so it did not work for me, thanks.
Re: HelloWorld stopped working [message #716931 is a reply to message #716702] Thu, 18 August 2011 20:00 Go to previous message
Cassandra  is currently offline Cassandra Friend
Messages: 2
Registered: August 2011
Junior Member
I don't know if it is everyone's problem, but I fixed my problem by installing the 32 bit version of Eclipse instead of the 64 bit. Didn't think I had to cause this is a 64 bit machine, but whatever works I guess.
Previous Topic:Problem with executable
Next Topic:CDT indexing problem
Goto Forum:
  


Current Time: Thu Apr 18 23:16:39 GMT 2024

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

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

Back to the top