C++ is the second language that I ever learned overall, with Java being my first. Java is a very IDE-centric language, so I was accustomed to that coming into C++. My journey took me through almost all of the IDEs available on Linux that can write, highlight, and compile C++ code all in one place. Here is my comparison.
Eclipse
Although Eclipse is one of my favorite integrated development environments for Java and the industry standard for Android application development, I was definitely not a fan of it for use in C++. By default, it does not work with cout or endl (and presumably other objects that are located in separate header files). Even with the scope operator "::" (that a beginner may not even think to use) it will not accept the usage of these objects as statements. Until these issues are figured out, Eclipse is not a good C++ solution.
Netbeans
Although I no longer have Netbeans installed to provide a picture or recall exactly how it handles C++, I can vouch for it. Netbeans, once it is set up with gcc, is one of the better C++ IDEs. It has code completion, documentation lookups for certain functions, and a built-in run display like Geany. The performance of Netbeans, however, is not worth downloading and installing Java and Netbeans itself if you don't already use it for something else.
Geany
This is Geany, a cute lightweight IDE coming in at only 4MB in size. It has a lot of nice features, like a symbols browser (outline of a program), document browser (for active files), good settings dialog complete with re-mappable keybindings and some unexpected stuff (like a jump-to-line feature). For being such a small IDE it has a lot packed into here. I have never used Geany much, but it's just about as good as it gets with C++ IDE's, despite its small size and simplistic feel. I've even seen its argument-completion be more accurate than code::blocks.
Qt Creator
Qt Creator is an enormous beast using the Qt graphical framework. It is cross-compatible, which is a plus, and is centered on Qt development. I cannot express what a great IDE this is to use. Code completion, documentation lookups, formatting, a GUI to create user interfaces, a settings manager that covers every detail, and a symbol browser are just a few of the good things about this IDE. This is the smartest of the IDE's I have ever used. It often corrects my mistakes (changing "." to "->" when talking about pointers) for me without me even realizing it. Another added bonus is that the IDE uses a .pro file to map out all of the files in a particular project, so it can categorize and remember what files belong to which project.
Qt creator is good for editing console-only code, too. It uses qmake, which may cause some minor complications, but that minor inconvenience aside it is a full-featured IDE.
Code::Blocks
Code::Blocks is the IDE that I personally prefer, even though it has less features than Qt creator. It is light for an IDE (only about 7 MB) and has a lot of pre-installed templates for C programs on embedded systems. Code::Blocks is very useful for console application development, and possibly GTK, but not much else. Its settings manager is similar to Geany's, but with a few more features. Two bonuses to using codeblocks are a formatting plugin called "Astyle" with a bunch of pre-installed themes and optional speed optimization (at the cost of compile time). Codeblocks has a symbol browser in one of the toolbars which are fully customizable. You can have as many or as few toolbars as you wish. You can even detach them. Another feature, although it does not matter to a C++ developer much, is the scripting console that Codeblocks comes with.
Conclusion
Those are all of the major IDE's for C++ development. Some prefer to use a text-editor and a compiler, and if you do, see Comparison of Text Editors. Otherwise, follow these trees:
Trees (Best to worst)
Features
Qt Creator
Codeblocks
Netbeans
Geany
Eclipse
Size (smallest to biggest)
Geany
Codeblocks
Netbeans
Eclipse
Qt creator
Ease-of-use
Netbeans
Geany
Qt creator
Codeblocks
Eclipse
Customization
Qt creator
Codeblocks
Geany
Netbeans
Eclipse
Compiler Integration
Codeblocks
Geany
Netbeans
Qt Creator
Eclipse
FINAL
Codeblocks: 14
Geany: 13
QtCreator: 13
Eclipse: 1
This, of course, is based on Console applications and does not include code extra features like code completion. The bottom line is, beginners should use Codeblocks and "Intermediates" should probably use Qt creator.
Very useful information. Thank you!!
ReplyDeleteIIRC, cout and endl are not in iostream. I think they are probably in stdio.h. That being said, it would explain why Eclipse wasn't able to find the reference. I don't personally use Eclipse, but of all its supposed shortcomings, I don't think that is one of them.
ReplyDeleteRegards,
Shmuel
Yes, cout and endl are in namespace std. Iostream is used for those indirection operators commonly used with them (<< and >>).
DeleteYou can write C/C++ apps on Android and for Android with CppDroid - free C/C++ IDE and compiler on Android. It has a lot of included C/C++ examples and tutorials. Blog: http://cppdroid.blogspot.com, Google Play: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.cppdroid
ReplyDelete