Hi everyone. I've decided to learn C++ and have come to the inescapable step of having to choose my development environment. I have a short list of IDE's I'm considering but, since I'm new to C++ and programming in general, I'm confused as to which I should pick. I've taken an intro course to Python but that's about it. Some information that may help: I'll be coding almost exclusively on Linux so any tips/tricks particular to the OS would be appreciated. I'll eventually use the IDE I decide on to create applications with a GUI and perhaps games. I want to be able to start using the IDE without spending too much time learning the interface. Any other IDE not on the list but could prove to be better than those listed is welcome! Here's the list:

  • NetBeans
  • Eclipse
  • Qt Creator
  • KDevelop
  • Code::Blocks

Thanks!

Myself, I prefer a good syntax-highlighted editor such as nedit, Makefiles, a good C++ compiler (g++ works for me) and a good debugger (gdb to go with g++). I've used Eclipse and others, but I prefer to know exactly what is going on, so I stay with the basic tools that these IDE's rely upon for their real compile/debug activities. I do use an advanced UML and MDA (Model-Driven Architecture) tool (Sparx Enterprise Architect) for my design and modeling. It will take my models and turn them into code, which I then work on, and use EA's reverse engineering capabilities to turn code changes back into model elements.

I suggest Microsoft Visual Studio or eclipse or netbeans.

I personally like Code::Blocks, it has syntax highlighting and it has a built-in Debugger. It supports plug-ins and, like Eclipse, they make some things much easier (one of my favourites is the Source Code Formatter).

As for GUIs and Games, GUIs are, in my opinion, better off being built with a visual IDE (has a toolbar and you can drag and drop things onto a window). For games, I really don't have the experience to advise on this issue.

Hope this helps!

You didn't say what operating system you are using. For MS-Windows, VC++ 2010 Express is my first choice, but for cross-platform I use Code::Blocks. If you are also interested in using the same IDE for other languages then Eclipse or NetBeans may be the best choice (although I have not used either).

There is a great deal to be said for starting with a text editor and calling the compiler/linker manually. It will give you an understanding of what's actually happening that is often lacking in many professional programmers with years of experience.

I code mostly on Linux, and I use emacs to write the code, and then hand-crafted makefiles to build the libraries and executables. Even if you only do that for a few weeks, it will provide you with an unassailable base on which to build and when you use an IDE and it misbehaves, you'll know exactly what should be happening under the hood.

commented: good points :) +17

Thank you for your very generous inputs! I don't know if I can do things manually at this point, but I'll definitely be starting out with NetBeans or Eclipse. Any opinions on Qt creator? It seems the IDE is backed by Nokia.

Qt Creator works well for developing Qt-based GUI applications. It will help deal with all the platform-dependent cruft quite well. You might want to try it out if that is what you are planning at some time.

I don't know if I can do things manually at this point

As every day goes by, the code you write will become more intricate and complicated with more files and libraries; now is the easiest time for you to do things manually.

As every day goes by, the code you write will become more intricate and complicated with more files and libraries; now is the easiest time for you to do things manually.

I'd like to do things manually, but have no idea how to do it. Any resource I can look into for that? What terms would I use for an online search? Thanks!

There are lots of links that show you how to create makefiles. Here are some of them.

Search: <name of compiler> terminal commands

that's what I did for a few compilers and one of the first few results worked for me

in my coding life I tried those IDEs
-Eclipse and Code::blocks are very much the same in editing, highlighting and auto-completing.....
Code::Blocks comes with built-in debugger
Eclipse you have to include the debugger like (Cygwin for windows) I think these give more flexibility to change the tool-chains and it supports other languages (PHP, Java, XML,..) more than that QNX use it for its SDK
but the disadvantage of the two that they don't support GUI programming

- QT I think it's great IDE -easy to use -include its own libraries like TCP\IP socket, Regular Expression,... which make life easier
and finally it support GUI, actually it's great in GUI in windows and Linux even it include openGl library for 3D programming

- KDevelop I think it's only an editor

I hope my humble infos are useful

I assume you should grab vc++ since you are learning on windows and neatbeans if you are on linux. There are many more to chooce from but these two give you most the features you want such as code autocomnpletion, syntax error hightlighting and both comes with strong compilers and debungers. As a beginner you should be concerned about how to read error, warning messages it gives you and learning c++. You should grab all things gradually, step by step, once you learn c++ and most important STL you could go learning about how to do something how to do something manually such as compile from comand line, otherwise it will put off enjoying of learning c++ and all will become eventually so hard.

Just adding my grain of salt here. Disclaimer: these are all just my humble opinion...

Personally, I use KDevelop. I find it to be awesome. The code highlighting is pleasant to the eye, the background parsing is fast, and code completion works very well. It is also fully integrated with gdb (for debugging). And it supports most build systems like makefiles and cmake. It is also integrated with Qt designer so that you can make GUIs with Qt Designer and code on them with KDevelop. I also highly recommend you get used to using an independent build system (non IDE-bound), and cmake is very nice for that (and cross-platform). I highly recommend KDevelop as an IDE, I have not found a parallel to it (commercial or free, Linux or Windows). On windows, I default to CodeBlocks which I think is also pretty good.

For the others, I have used most of them in the past as well.

Linux/Windows:
- Code.Blocks: As I said, it is nice. I like the fact that it has few "automatic" BS that gets in the way of coding. However, I think it has poor integration with third party software (external build systems, debuggers, GUI tools, etc.). I also find that the code completion (and background parser) is too slow to be useful, I usually turn it off, since I can type faster than it can come up with code completion suggestions.
- Eclipse: I have used the Java IDE for some course-work. I was not impressed one bit. Poor integration with third-party. It has a "you are a complete beginner" attitude towards the programmer (which I don't think is beneficial even to a beginner). Customizations and options are very few, and only cosmetic.
- Qt Creator: That one is pretty good, but it is geared towards Qt, of course. But I know that a lot of people use it as a general IDE for any kind of coding as well. Personally, I have little experience with it.

Windows:
- Visual C++ / Studio: Don't get a version that is earlier than 2010. I have heard a lot of good things about 2010 version, enough to make me think it's a decent IDE, which is a lot because I have used versions 2005 and 2008 and thought they were completely worthless (except for the built-in debugger). Before 2010, code completion was very slow and constantly failed even with the most trivial code, same goes for code highlighting. And since it comes from Microsoft, there is a strong tendency to make your life extremely difficult if you try to implement anything that is meant to be cross-platform (or even if you want to reduce the ties to MS run-time libraries). The configurations are not intuitive, and you end up wasting a lot of time configuring your build correctly, and since it doesn't integrate to an external build system too well, you have little choice there. But I hear that the 2010 version has improved on all those fronts.
- Borland C++Builder (or CodeGear, or whatever it is called now): This one is very nice, I used it for years on Windows. Code completion and highlighting is very fast and doesn't fail much. VCL/CLX is very nice for GUI development. And the debugger is also quite good (not as good as Visual Studio though).

That about sums it up. I do recommend like others here to get used to "doing things manually". Being able to compile code from command-line is quite useful knowledge (even if you plan to use an IDE and compile your code from it, you might want to use/test open-source libraries which are almost always built via a command-line build system (cmake, makefiles, autoconf, bjam, etc.). Most projects beyond the most trivial ones have to rely on an external cross-platform build system, and I suggest you get to know that sooner rather than later, because it will teach you more about the actual process of compiling several source files (or Translation Units (TUs)), linking them together along with external libs, conditional compilations, multiple targets, system configurations, etc. etc. But take it one step at a time. Personally, I highly recommend cmake for this purpose.

As a bunch of other people have said, starting out manually compiling on the command line is the way to go. It's also the simplest for small projects. When you first start out, you probably won't be making projects with hundreds of files and many different build configurations to manage, so it's probably the quickest too.

If you're using Linux, then you'll almost certainly be compiling with gcc. The C++ version of gcc is g++. You will definitely be able to find these in the package manager of whatever Linux distribution you're using. In Ubuntu, for example, you can do something like: sudo apt-get install g++ and then you will have a C++ compiler that you can start using straight away. I'm sure you can find a whole bunch of "Hello, World!" examples to get going with. Once you have your program (which you can write in a simple text editor, I sometimes use gedit on Ubuntu) then you can compile into an executable by doing something like: g++ myFistProgram.cpp -o myFirstProgram This will compile the source code (in myFirstProgram.cpp) and then link it into the executable (that's the -o part). Then you can run the new program in the terminal by doing: ./myFirstProgram You should then see the output from the program. As you can see, when you only have a simple program with one or two files then this is really not that complex! It certainly easier than setting up a new project in MS Visual Studio or something.

There are a couple of things to look out for when you first start using C++:

  1. If you find examples that start with something like #include <iostream.h> then it's probably quite an old tutorial (the current standard way to write this is #include <iostream> , without the .h )
  2. When you want to start using other external libraries (which you will one day) and you download the package from the package manager then make sure you also have the version that ends in something like "-dev". This has all the files that need to be #include'd into your code. (This took me a really long time to figure out when I first started!)

Hope that helps :o)

My 2cents:

1) Use IDE first. Concentrate on creating actual project rather than handling how its made.

2) After you have enough experience, you might want to learn about makefiles and whatnot.


3) Just START ALREADY. Pick one and start instead of contemplating for days. You could be using those hours to code.

Concentrate on creating actual project rather than handling how its made.... Just START ALREADY.

Project is making project. It is not coding. No waste time make project. Code first. Worry about projects later :)

Project is making project. It is not coding. No waste time make project. Code first. Worry about projects later :)

This is so contradictory, that my head just exploded.

In Ubuntu, for example, you can do something like: sudo apt-get install g++

Don't forget sudo apt-get install build-essential

Microsoft Visual C++ 2010

This is so contradictory, that my head just exploded.

Something like this one liner, for example :)
This runs under the cshell. Might need to change for bash or the like.

echo '#include <iostream> \n int main(){std::cout<<"Hello world!";return 0;}' | g++ -x c++ -

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.