views:

6646

answers:

11

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...

Thanks

+8  A: 

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: http://developers.sun.com/sunstudio/downloads/express/

Nazgob
+4  A: 

Personally I prefer NetBeans - the project management is excellent and I was up and running quicker than with Eclipse. However, it is subjective and YMMV.

Rob
I've noticed that too. You might want to try a slimmed-down version of Eclipse to see if that helps. http://www.eclipse.org/callisto/c-dev.php
Bill the Lizard
+9  A: 

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?

Josh Kelley
At this point in time Eclipse + CDT is really, really good for C++ development. The editor especially it great, and emacs bindings make it extremely easy for old emacs hands to switch and still be efficient.
Just tried both, and my 5 minute choice, went to Eclipse the file/class navigator and the syntax checking did it for me. Also Eclipse build->check cycle seems faster than Netbean's (<- uses X?)
Robert Gould
A: 

having used eclipse for some time now i recently took a look at netbeans and must say i quite like it. at the end of the day they are both excellent ides and it is a very subjective choice. in my opinion netbeans seems to be a bit faster than eclipse, but that might just be a feeling.

fly.floh
+1  A: 

They're both excellent for C++ development, but one thing that I've recently found lacking in NetBeans is that there doesn't seem to be a plugin available for CppUnit, or any other C++ unit testing framework. I'd love to get some more responses to this question if I'm wrong about that.

(Also, I know development is always going on for NetBeans, so maybe someone will come up with a plugin soon.)

Bill the Lizard
+6  A: 

They are both bloated and slow, IMHO. Why don't you try Code::Blocks instead? It is specifically aimed at C++ developers and performs much better than either Eclipse or NetBeans.

Nemanja Trifunovic
I loved Code::Blocks spiritual predecessor Bloodshed, and tried Code::Blocks a few years ago, back then is wasn't as cool as it is now. Unfortunately its MacOS support is still weak.
Robert Gould
if (java) printf("bloated and slow");
Hoffmann
@Hoffmann: Rubbish.
quant_dev
A: 

For C++ I'd have to agree with Nemanja Trifunovic and say you should give Code::Blocks a look. It's free, and has great performance. I started using it a few years ago after switching from Bloodshed Dev-C++ (which is basically not supported anymore) and couldn't be happier.

artifact of culture war
+2  A: 

The only thing I hate about Netbeans is that the debugger is kinda slow in comparison to Eclipse . Besides that , Netbeans would be my choice .

Geo
Yes building->debugging seemed really slow. The one thing I really love is fast iteration, so that was the weak part of Netbeans for me
Robert Gould
A: 

The c++ parser in code::blocks doesn't seem to be on par with netbeans and eclipse ones: according to code::block's wiki, it needs to be entirely rewritten.

bohan
A: 

Use KDevelop ;)

pinpinokio
+1  A: 

Just to give 2 cents to the comments about speed or performance issues with eclipse/netbeans:

The only part of an IDE that sucks if it is slow is the editor component. And in contrast to some obviously superficial assertions here, I found the editor component in Eclipse extremely snappy. The rest of the IDE is prone to lags, but the editor itself delivers spotless performance. I have a 1.4GHz Laptop and use Eclipse with it. Eclipse's editor component is faster (especially when scrolling/browsing through text) than Code::Blocks or KDevelop. The simple reason for this is: Eclipse caches everything, especially the syntax highlighting etc., other IDEs seem to try to do this ''live'' and fail. The c++ indexer was a cause of woe in versions past. It crashed when out of memory, without it none of the nifty search functions worked, etc. For the current version I can only say: It is all fixed and it works like a charm. It's speed is comparable to the VisualStudio Indexer.

If you install Eclipse CDT you get a ton of nice features as has been explained in other replies already, that most other IDEs only provide with multiple plugins. (I don't know about netbeans, never used it.) The feature that kicks me everytime is the smart tooltip when I hover over some identifier. Eclipse gives me direct access to any javadoc that might be entered somewhere and the file where it is defined and even lets me scroll around inside the tooltip! So I have every identifiers full context at my fingertips, everywhere. I prefer it over Visual Studio and pretty much everything else I've tried.

Granted, everything else you do in the IDE could be snappier. For me, the crucial thing is, that the editor is fast and eclipse's definitely does a great job there.

AndreasT