Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Hello world: CDT+cygwin(Problems with running of program)
Hello world: CDT+cygwin [message #1096358] Wed, 28 August 2013 05:23 Go to next message
Eclipse UserFriend
I wrote and compiled "Hello world" in C++ for Exclipse and cygwin and compoled it acording instruction _h_t_t_p_:_/_/_www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html.
#include <iostream>


using namespace std;

int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
int hours = 0;
cin >> hours;
return 0;
}

I couldn't run program (see screen). In cygwin compiled file works, but in Eclipse doesn't. Thanks.
Re: Hello world: CDT+cygwin [message #1096646 is a reply to message #1096358] Wed, 28 August 2013 13:23 Go to previous message
Eclipse UserFriend
Disclaimer: I don't happen to have Cygwin installed on my Eclipse system, but suggest you double-check some things:



  1. Check Run Configurations: If you haven't done so already, click on Run in the main menu then Run Configurations. Double-click on C/C++ Applications to create a new entry. If you don't see the binary listed, you can use either the Search Project or Browse buttons. On the Common tab I usually check Debug and Run under "Display in favorites menu". After you've set what options/values you need on the various tabs, look at the very bottom of the window and you'll see a "Run" Button. Since I don't see the toolbar/favorites displayed in your screenshot (Window > Show Toolbar), you can try running your application using that button
  2. Try running the binary from a command prompt: Open a command/shell prompt then navigate to the location of your binary and see if it will run from a command prompt
  3. Check the logs: Right-click on your project > Properties > C/C++ Build > Logging. If you don't have Enable build logging checked, then check it and rebuild. Look at the logs from the build. That might offer some clues


Hope it helps.

SenseiC bows out

PS: If I get a chance I'll build a Windows VM, install Eclipse and Cygwin , then fiddle with it some, but cannot run it on this system (raw iron).
Re: Hello world: CDT+cygwin [message #1096647 is a reply to message #1096358] Wed, 28 August 2013 13:20 Go to previous message
Eclipse UserFriend
On 28-08-13 16:36, D H wrote:
> I wrote and compiled "Hello world" in C++ for Exclipse and cygwin and compoled it acording instruction _h_t_t_p_:_/_/_www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html.
> #include <iostream>
>
>
> using namespace std;
>
> int main() {
> cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
> int hours = 0;
> cin >> hours;
> return 0;
> }
>
> I couldn't run program (see screen). In cygwin compiled file works, but in Eclipse doesn't. Thanks.

Is the cygwin dll in the Eclipse path?
Previous Topic:Eclipse on ubuntu 12.04
Next Topic:C/C++ comments: line wrap / format paragraph / auto fill
Goto Forum:
  


Current Time: Wed May 21 08:25:07 EDT 2025

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

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

Back to the top