Netbeans or Eclipse for C++?


I'm currently working on a pet project and need to do C++ development on Windows, Mac, Linux, and Solaris, and I've narrowed it down to Netbeans and Eclipse, so I was wonderig which is more solid as a C++ editor. I just need solid editing, good autocompletion for templated code ad external libraries, and project file management, the build tools are external, so thats irrelevant here, for my comparison.

Thus which is a better choice?

Note: I know I should be using emacs or vim, but the issue is, my theory at least, that I'm left handed, so I use my right side (design,creativity) of the brain more than the left side (logic, memory), so I just simply cannot use emacs or vim, my brain simply isn't compatible, I tried them many times too, even used emacs for a few months but it drove me crazy...


11/21/2008 11:58:42 AM

Accepted Answer

I haven't used NetBeans, but Eclipse CDT (C Developer Tools, which includes C++), especially with the latest version, is really quite excellent:

  • Syntax checking and spell checking
  • Syntax highlighting that distinguishes between library calls and your function calls and between local and member variables and is even applied to code that's #ifdef'ed out
  • Macro expansion that can step you through each level of macro application or show the final result even of very complex Boost Preprocessor macros
  • A file and class outline view that updates dynamically to show where you are in a file. (Commercial IDE's I've used fail to do this.)
  • Powerful, flexible Find/Replace and Find in Files features with complete Perl-style regex support. It's also supposed to be able to do a C/C++ Find in Files that can search based on language semantics (e.g., only find references, not declarations), although this sometimes doesn't work for me.
  • Automatic tracking of TODO and other comment tags
  • Mouseover tips that show the exact declaration of a variable or function, including any comments, instead of just where a variable or function is declared. (Again, commercial IDE's I've used fail to do this.)
  • Support via plugins for Subversion, Doxygen, etc.
  • Some refactoring support - rename, extract constant, extract function, a few others
  • Code reformatter, based on user-definable code styles

You'd asked specifically about its editor; the Eclipse editor is good enough that I use it in preference to the commercial IDE for our product whenever I don't need the commercial IDE's forms designer.

Eclipse's debugger integration (using gdb) is tolerable but not great, and its memory usage is high. A few features (like the C/C++ Find in Files) don't work reliably or require reindexing (which is time consuming) for no apparent reason, but the latest version seems more reliable in this regard.

Can someone who's used NetBeans fill in how it compares?

11/21/2008 3:47:35 PM

I'm using Netbeans from time to time on Solaris and the latest (6.5) version is pretty neat. It has all the features that you need, perhaps autocompletion could work better, but I have a really bad code base so it might be the result of it. Keep in mind that you need strong machine for that, if it's your PC it's ok but Netbeans on a remote server (like I tried) is really slow unless you have a decent hardware. There are few simple refactorings for C++ with nice preview option, definitely worth a try.

You can get a whole Sun C++ pack from here:

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow