37

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

Serge
  • 7,706
  • 5
  • 40
  • 46
Robert Gould
  • 68,773
  • 61
  • 187
  • 272

13 Answers13

27

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
  • 56,064
  • 19
  • 146
  • 246
  • 1
    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. – Mark Kegel Nov 21 '08 at 15:04
  • 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 Nov 21 '08 at 17:03
16

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
  • 8,502
  • 4
  • 40
  • 42
  • It doesn't have the feature to create a project somewhere then link to a src folder somewhere else. Or at last I didn't find it. – Offirmo Jan 25 '13 at 10:15
12

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
  • 76,700
  • 56
  • 158
  • 197
  • 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 Nov 21 '08 at 13:02
12

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
  • 24,346
  • 3
  • 50
  • 88
  • 1
    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 Nov 21 '08 at 17:08
  • 6
    @Hoffmann: Rubbish. – quant_dev Jan 14 '10 at 15:14
  • 7
    @Hoffman: Wrong :) have you seen IntelliJ IDEA? It was written in Java, runs faster than Code::Blocks (written in C++). And it even have much more features... – Zippo Jan 04 '11 at 08:57
  • Aha, and its C++ support is experimental. – Brian Cannard Jul 16 '14 at 12:44
  • 1
    @Zippoxer Code::Blocks is way faster than Intellij IDEA, Eclipse, and Netbeans together (at least, in my experience; they don't even come close). – icedgoal May 22 '15 at 08:23
7

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
  • 9,417
  • 11
  • 46
  • 60
3

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
  • 93,257
  • 117
  • 344
  • 520
  • 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 Nov 21 '08 at 17:05
3

If you run eclipse under linux you can use valgrind for memory leaks. Eclipse supports gdb well enough for me, but I couldn't find a decent memory leak plugin, and the valgrind integration plugin is in beta. This blog does a great tutorial for it: http://kapo-cpp.blogspot.com/2007/02/detecting-memory-leak.html . I cast my vote for eclipse on linux. P.S Real men use ed only.

darkhipo
  • 1,384
  • 1
  • 14
  • 19
2

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.

Johan Boulé
  • 1,936
  • 15
  • 19
1

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

Community
  • 1
  • 1
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
1

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.

h0st1le
  • 98
  • 6
1

I'm a huge fan of Eclipse and have used it extensively for Java and C++ programming. However, currently, it does not support remote C++ development. I tried Netbeans Remote C++ development and have found it to be rather excellent and extremely simple. Having said that, the C++ parsing is not as fluid as Eclipse, the autocomplete sometimes gets in the way and doesn't go away, and the biggest problem I have had is the constant need to restart the IDE due to very slow performance. I hope Eclipse can continue to build it's Remote C++ development capabilities and use Netbeans as an example of how to make it very simple!

ossys
  • 4,157
  • 5
  • 32
  • 35
0

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
  • 420
  • 2
  • 6
0

I have been using Net Beans so far. But I was forced to switch to Eclipse due to problems in NetBeans. There is a Net Beans bug which renders the IDE useless when you work with projects with a large amount of source files. Many people have been complaining, but it seems the Net Beans team was unable to fix the problem which stops the IDE from responding when it is parsing the source files. :(

Reported in: Petr Dvorak - Oracle Blog

As a solution they provide an on-demand parsing mechanism which does not work for me :( Net Beans Wiki

Sampath
  • 1,144
  • 1
  • 21
  • 38