Using Eclipse for C++

For over 2 weeks, I’ve been writing code using Emacs. To see what writing C++ in an IDE was like, I tried writing a simple “Hello World” in Eclipse and when I hit run, I was getting an odd “Launch failed. Binary not found” message. I googled that exact error message and hit pay dirt.

With hindsight, the error message told me all I needed to know. The .cpp file gets compiled to a binary file i.e. object code which is executed. If you were compiling via the commandline, your commands would look like: g++ -o executableName filename.cpp and to execute, you would type ./executableName. Accordingly, your .h/.cpp file needs to be built and in Eclipse, that command is Ctrl-B or the “hammer” symbol. 



3 thoughts on “Using Eclipse for C++”

  1. I haven’t touched C++ in years but, I’ll likely need to do so soon. I also have yet to use Eclipse for C++ or within Linux. This is good to know, especially since the build step isn’t required for Java.Come to think of it, I don’t recall needing to build as a single step when using Visual Studio for C++ either. I may have to try this out soon.Do you prefer text editors to IDEs?

  2. For simple Java projects, I prefer my text editor (Emacs) but for the GUI stuff I’m learning now, definitely an IDE. For a novice (like me), having the editor prompt me on missing libraries and being able to put a dot after a class/object name to bring up its methods & explanations is invaluable.For C/C++, my professor has had us use text editors (even for the GUI stuff) which is not too bad.

  3. I’ve only had one professor throw us into text editors. I can say that I learned to pay more attention to what I am writing that way. I still like the management features of IDEs.I like your full emersion approach. I may throw some *nix on my netbook.Are you using Git from CLI as well?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s