C++ IDE on Linux [closed] - c++

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We trying to choose an IDE for C++ development on Linux.
The proposed options are KDevelop and Eclipse.
Eclipse is highly customizable, but Java centric and heavy.
KDevelop is bounded to particular KDE (I believe because KDE API) and can not be replaced if required.
What you use and why?
Thanks
Dima

KDevelop, because:
It supports CMake.
It fully integrates with the GCC utilities.
It has a good syntax highligher and code editor
It has a relatively quick startup time and is relatively light weight.
Since you are comparing KDevelop with Eclipse, let me also point out that:
KDevelop uses a file for its projects, so you can open the project file in your file manager. By contrast, Eclipse stores metadata in folders, so you need to open your Eclipse project by running Eclipse.
Because KDevelop stores its information in a single project file, whereas Eclipse uses lots of hidden metadata, KDevelop leaves your code folders much cleaner than does Eclipse.
KDevelop will never attempt to delete files on your filesystem, unless you specifically ask it to do so. By contrast, it is very easy to accidentally harm files on your filesystem using Eclipse.
Also, when I've used KDevelop, I've been using it on Ubuntu which uses the Gnome desktop. On Gnome, KDevelop still beats Eclipse in terms of startup time, and is definitely worth using.
Also, one last note, if you use CMake with KDevelop, then you can distribute your source code to users on Windows, Mac, and Linux, and they will be able to compile your source code, even if they don't have KDevelop; CMake can generate a native Makefile, a Visual Studio project, an Xcode project, or a KDevelop project. So, the concern that you can't replace KDevelop really doesn't apply if you use the CMake backend.

I use Qt Creator, which is excellent if you're considering using Qt. I've found the C++ tools for Eclipse work well though - editor seemed solid, debugging "just worked", so I was happy!

I use Eclipse and like it quite a lot. The CDT plugin makes the interface much more c++/C friendly and the extensibility of Eclipse with other plugins makes it a "one-stop-shop" IDE for many needs. I use it for PHP, Perl, C++, Database work, and ColdFusion.
One of the best things for Eclipse IMO, is the Mylyn Plugin. Task based filtering has been a wonderful addition to my work flow.

Emacs :)
Customizable beyond your wildest dreams. (And you can play tetris while code compiles)

Have tried, codeblocks, netbeans and eclipse with c++ support and qt creator.
Netbeans and eclipse work just fine, but their default window layout and editor settings make me "sick" each time when I install them as one needs to remove/minimize change fonts, size etc in order to make it somewhat readable as the default settings are just covering too much of the screen. It's java based and somewhat laggy on my laptop running ubuntu (different versions over the years) on a cd2 2.2ghz with 2gb ram. I have no idea as to why since I completely reinstalled the distro's several times. That slow and sluggish feeling when one opens the debugger and it slowly crawls through the code is the worst. Same when you are manually going through the function calls (clicking like mad and controlling values), and if you do that a lot (big project) the IDE will totally slow down making you wait 3-5 sec after each press of the button.
Netbeans especially seems to have something against ubuntu as sometimes it will not scale the windows accordingly and some settings will overlap each other. Very irritating.
Code Blocks with the nightly build works best right now in my opinion of those 4 as you can just install and start working without need to fix the font/size, windows etc. It is also the fastest IDE of those I have tried in building / cleaning projects and responds fast when opening/closing prjects, starting program.
Qt creator is like an "mac app". It looks visually very nice, it's simple to use but then again I just dislike when I need to debugg in it. It just doesn't have some of the options that other IDE's have. If you are however developing UI then I highly recommend it because of it integrated gui layout designer.
The Eclipse version that I was using was 5 months old, netbeans 2 months, Qt creator 5 months old and Code Blocks only 20days as I regularity update the nightly builds every month.
If you have not guessed it by now, its Code Blocks that I'm using on my ubuntu distro.
Then again the biggest disadvantage with these IDE's when comparing to the VS2008 that I also use is the debug part. VS just has everything done nicely and you can see the values in vectors, strings etc just by hovering the mouse on the code. When looking inside structures you also skip all the "unnecessary" information so that you dont need to press on like 5 "pluses" and expand the lines in order to see what is saved in a vector.
These were my "daily experiences" with those IDE's on linux as I believe they are important than just listing different features that each IDE has. Everything else seemed to work fine (and I haven't really tested every single feature in great detail). Hope that this will at least help somewhat in deciding what you will pick.
Having said that, Kdevelop you are next on my test list as I haven't tried it yet.

Not a classic IDE but emacs or Xemacs works well as an IDE on linux given that it can be set up with integrated build and debugging.

Code Blocks is an option

I think the correct answer is to try both (and maybe others) for yourself. Personally, I've used Eclipse for the past ~3 years. I'm satisfied with it but there are parts that I think could be better.
But, I think your best bet is to install both and try them each for a week or 2 (maybe longer). A lot of this comes to do personal preference and taste. This is the 2009 version of the vi or emacs question :)

I use CDT on eclipse I find it very responsive.
Plus plugins like Subclipse, Mylyn etc really make development a lot easier.
I use Java and C++ together is some projects so the fact I can code Java/JNI/CPP in the one IDE makes life a lot easier in my opinion.

If you are looking for light IDE you can try vim. With appropriate plug-ins and skills it might be very powerful.

QtCreator
Eclipse
Netbeans
KDevelop
Each has strengths and weaknesses, and it'll depend a lot on on what else you're doing.

You can also try Anjuta (good for GTK environments) or Geany.

I have been using QtCreator.
Nice and clean interface (seems snappier than Eclipse - though I have not used it in a while) and supports debugging.

Geany \M/

Related

Eclipse CDT vs NetBeans C++ vs [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Best C++ IDE or Editor for Windows
Hello, everyone.
For a long time now, for C/C++ development, I have been using Notepad++ and the command line for compiling C/C++ programs. Now, I want to start using an IDE, and I have tried out quite a few. Currently, I am thinking of either Eclipse CDT or Netbeans C++, but other suggestions are welcome too. The problem is that I cannot find any recent, unbiased comparisons of both of these softwares. So, I would like to hear opinions on which IDE is better. By "better", I mean in terms of code-completion, configurability, ease of use, speed, and especially debugging capabilities and debugging speed. I really need help on choosing a C/C++ IDE. Thanks!
EDIT:
Because I develop on both Windows and Linux, I need an IDE that is compatible with both Windows and Linux, and by default uses GCC by default, so Visual Studio is not an option for me. Thanks!
I have used Eclipse for years, and it is a solid IDE with a wide range of capabilities. If you haven't tried it out to see how well it fits your needs, I would recommend giving it a shot.
That being said, I have recently started using NetBeans and I must say that I like it a bit better than Eclipse. It seems to be more streamlined than Eclipse (less memory usage, faster to start up, etc). I have not tested its built-in debugging capabilities however, so I can't say anything on that front.
Thankfully, there are a number of freely-available, quality IDEs out there. I would recommend installing a handful and trying to perform the same basic set of tasks in each (create a new project, add in your source code, build, run, debug, etc) and see how they feel. Pretty quickly, you should start to get a feeling about which ones meet your needs and which are lacking.
After your question edit:
I'd strongly recommend Code::Blocks: http://www.codeblocks.org/
I'd like to throw in my vote for Visual Studio.

Good C++ Debugging/IDE Environment for Linux?

I have a friend who is trying to make the switch to Linux, but is hung up on the apparent lack of debugging/IDE environments for C++, especially as they relate to template programming. He has been using visual studio for years and is maybe a little spoiled by their awesome IDE. Does anyone have any good suggestions for an environment where he can, under Linux, develop and debug with all of the usual things (Breakpoints, line highlighting for compilation errors, step in/over/out/etc, etc) that he's accustomed to? Thanks!
How about Eclipse + CDT ?
Although many people think of it as a Java IDE, he could try NetBeans. I've used it on Windows for C and C++ development without a problem, and I know NetBeans is supported on Linux, so it would be worth a shot.
It looks like most of the features he wants are included in the C/C++ development toolkit, including integration with GDB, a profiler, and more.
Visual Studio is good, indeed.
On the free side:
Qt Creator is getting quite good too, it's worth a try. There are advantageous by-products coming from the Qt framework:
huge library - not only to build GUI applications but for other domains as well
portability on multiple platforms
A version 1.3 beta is available as a preview of the upcoming release but the current 1.2.1 is already all you need to manage projects.
Eclipse has already been mentioned, it's a very good environment offering many plug-ins (Mylyn, SVN, ...).
MonoDevelop somewhat supports C++ (more and more, I didn't check the latest version).
I've used Eclipse for C/C++ and it's pretty useful. It's also used at ACM ICPC World Finals http://cm.baylor.edu/welcome.icpc
I'd recommand Code::Blocks (but use a nighty build). It can be coupled with gdb to enable step by step debugging and all that stuff.
Not exactly an IDE but SublimeText 2/3 is available on Linux now. There may be a debugger plugin for it too, who knows.
Edit
Here's a gdb plugin for SublimeText
I havn't explored it personally, but Emacs has a C++ development addon that looks very much like a full IDE.
About 7 years ago I used KDevelop that was shipped with KDE. I found it quite good back than, and I hope it also improved with the time. I found it quite comparable to VC++ 6 at this time.
It also contains Qt support, if you are in need for some GUI toolkit.
Depends, Code::Blocks is good, Eclipse is very nice too, but you will need a very good computer. In my opinion the best choice iss gcc, gdb and ViM or Gedit.
My buddies from work use Eclipse + Scons, they also use Valgrind(spelling?) for tracking memory leaks and such.
Many of the IDE features you listed were debugger features. The ddd (Data Display Debugger) debugger is quite a nice GUI wrapper for gdb, allowing graphical representation of data structures, a non-crappy source listing window (ie. unlike the l command of gdb where you don't get context), and also allows you to use any and all native gdb commands directly if desired.
Have a look at CodeLite. It's available for Ubuntu and Fedora out of the box and even for Windows and Mac. So you can have the same IDE on different platforms.
We tried Eclipse and NetBeans but left them due to their huge CPU and memory usage. We have a development server and all the developers connect to it via RDC. Thats why these IDEs miserably failed in our model.
So, we looked for some native IDE. Found CodeBlocks to be very good and super fast. We sort of settled on it but later found CodeLite and liked it better than CodeBlocks.
I just seeing this question after 12+ years. AnyHow I just writing my answer. I personally use Quincy IDE for C and C++ development. it is very lite weight and debugging watch list is very much good and easy to use. I'm just attaching the link to the site. try it.
But you have to install it with wine.
Quincy <-- Click here

open source dev environment for C++: what's better? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to do some coding in my spare time, but the thing is, I don't want to spend the money on this.
Would the following set of development tools be The Right Thing, or is there something I'm forgetting?
Eclipse for C++
SVN for source control
Qt for UI development (since it's C++, and I believe it's now opened by Nokia)
hudson for continuous integration
I'd like to write a little image processing application that can run on any platform, but the main platform at the moment will be Windows with a possible movement to the Mac-- hence all the cross-platform tools.
Is there anything really obvious I'm forgetting? Like something like fxcop for style checking in C++?
If I use any libraries, I'd like to avoid GPL libraries; if things go south with my current employer, I'll want to monetize this.
Microsoft Visual C++ Express is free and easily the best IDE for Windows. Furthermore, you can use it to work on cross-platform code - it more depends on writing standards-adhering code and using portable libraries.
If you want to write cross-platform code, I recommend a cross-platform build tool. I use CMake, which generates Visual Studio solutions on Windows, but there are others too, such as SCons.
As for libraries, it depends on what exactly you need to do. Qt is an excellent GUI library. libpng/libjpeg and others are good for loading/saving images at a low level, but there are probably other higher-level image libraries as well.
[edit] A response to the comment about MSVC and Qt:
A quick search brings up Trolltech's Qt Visual Studio Integration page:
Qt Visual Studio .NET Integration
A comment points out that this is actually not free (a free addon is available at this link, but this runs Qt designer outside of Visual Studio. Also, the Express version of Visual Studio does not support plugins.
For coding specifically in Qt there is another new IDE created by Qt: Qt Creator. I've heard good things about it, and it is also portable across Windows, Linux, and Mac.
I detect procrastination (something I'm often guilty of) - just write some code - you can always add tools as you go along.
The problem with questions with phrases like "what's better" is that it's really hard to determine what's right in a specific situation and maybe impossible what's "better".
Said that, I use Eclipse CDT sucessfully as an IDE on Linux. I use frameworks like ACE/TAO to create code that is highly portable.
I know that QT is a very good UI framework. KDE is built on top of KDE and if you use KDE/Linux then you may also want to look at KDevelop, a C++ IDE that has many users.
In the end I believe that you and only you can figure out whats best for you to use. Make sure you check the alternatives and then make an educated decision.
for c++ there are a few more freewares available such as codeblocks and devcpp. I find eclipse very heavy on the machine.
There are many tools that make the difference:
A C++ compiler ... (it wasn't in your list)
doxygen
STLfilt (which is a must have when programming in C++)
A UT framework (CxxTests, boost.test, Fructose, google.test, ...)
something to manage the compilation chain (scons, aap, (b)jam, cmake, ...) -- I've no idea what eclipse is using.
Source control: git. It's not as diffucult as people make it seem. I'm an svn newbie and I still managed to learn the basics of git for use in everyday life! There are about 4 or 5 basic commands that will get you going in no time. Read the official git tutorial
Regarding IDE's, there are a few choices
Microsoft Visual C++ Express Edition (free lite version)
Eclipse with CDT
QtCreator. (Since you're using Qt for the GUI)
Personally I have used Eclipse+CDT for a number of projects. Paired with wxWidgets it has provided me with enough to keep myself pretty much crossplatform (which I think is a big plus).
Also QT has some interesting releases with an IDE now, make sure you check it out: http://www.qtsoftware.com/products/developer-tools
Like earlier suggestion, just start coding, you will eventually find out what is the appropriate mix for you. It varies greatly between individuals what is the "best" IDE or mix of command line tools, etc.
Eclipse CDT is making huge strides, and even organizations that were unx tools only are now finally joining the IDE bandwagon. Considering downloading a current milestone, not the official release.
If you're using windows, don't use Eclipse directly, find a third-party distribution that already has all the GNU tools in it (I forgot the name, I can look it up).
Once you switch to mac it's easier, but make sure to install xcode to get your GNU tools.
If you are using svn - VisualSVNServer is an excellent free GUI based way to setup and administer your SVN repository, definitely worth checking out as it means you have little/no messing about with config files etc. to change your repository.
Regarding version control - Subversion is pretty much standard and is very well supported. From what I've heard, Git is more powerful but harder to use; it's worth a look for a new one-man project, since you wouldn't have the support and retraining concerns that other projects would have.
Regarding IDE, since Visual C++ Express is currently the highest-voted answer - I've used both Eclipse and Visual C++ Express. I don't have a whole lot of experience with Visual C++ Express, so it might have features that I've overlooked, but from what I've been able to compare, Eclipse offers a lot more features. I tried to list its more impressive features in this answer; from what I've been able to see, Visual C++ Express doesn't have any of the features listed there. Eclipse is slower and more resource-intensive, but with a fast enough desktop, its extra features are more than worth it.
In terms of version control, use git and throw your project on GitHub or Gitorious. There's really no reason to use Subversion anymore, due to its painful branching and merging, and lack of a distributed model.
See this link here for why Git is better than X:
http://whygitisbetterthanx.com/
There's also no point in using Sourceforge or GNU Savannah, as the Git front-end sites have much more valuable features and are easier to use.

Best C++ IDE for *nix [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best C++ IDE for a *nix envirnoment? I have heard the C/C++ module of Eclipse is decent as well as Notepad++ but beyond these two I have no real idea. Any thoughts or comments?
On Ubuntu, some the IDEs that are available in the repositories are:
Kdevelop
Geany
Anjuta
There is also:
Eclipse (Recommended you don't install from repositories, due to issues with file/folder permissions)
Code::blocks
And of course, everyone's favourite text-based editors:
vi/vim
emacs
Its true that vim and emacs are very powerful tools, but the learning curve is very steep..
I really don't like Eclipse that much, I find it buggy and a bit too clunky.
I've started using Geany as a bare-bones but functional and usable IDE. It has a basic code-completion feature, and is a nice, clean [Gnome] interface.
Anjuta I tried for a day, didn't like it at all. I didn't find it as useful as Geany.
Kdevelop and code::blocks get a bunch of good reviews, but I haven't tried them. I use gnome, and I'm yet to see a KDE app that looks good in gnome (sorry, I'm sure its a great program).
If only bloodshed dev-c++ was released under linux. That is a fantastic (but windows-only) program. You could always run it under Wine ;)
To a degree, it comes down to personal preference. My advice is to investigate Kdevelop, Geany and code::blocks as a starting point.
As a programmer who has been writing code under linux for many years, I simply cannot seem to move away from using Vim for writing code.
Once you learn it, and learn some of its more advanced features (Code Folding, how to use ctags, how to work with multiple buffers effectively, etc) moving to another editor is very hard - as everything else seems to be missing features that you're used to.
The only other editor with a superset of vim's features is emacs. I highly recommend learning one or the other - and if you have questions, don't hesitate to ask here or in #emacs or #vim on irc.freenode.net - there's a very large and helpful community that will help you learn what extensions or commands best suit the software editing problems that you're facing.
[Edit: A comment noted that "vim isn't an IDE", I agree. I don't like the IDE moniker because it means a gui with a project manager and a bunch of drop down boxes. I like to use the terminology "Good Tools". See Ted Leung's writings on the matter]
I would recommend CodeBlocks.
Highlights:
Open Source! GPLv3, no hidden costs.
Cross-platform. Runs on Linux, Mac, Windows (uses wxWidgets).
Written in C++. No interpreted languages or proprietary libs needed.
Extensible through plugins
Compiler:
Multiple compiler support:
GCC (MingW / GNU GCC)
MSVC++
Digital Mars
Borland C++ 5.5
Open Watcom
...and more
I'm surprised noone has mentioned Qt Creator, as it's available in most repositories, quite small in size and yet does most things I need very well.
I just use Emacs.
Emacs is a fantastic, stay-out-of-my-way-but-be-able-to-do-everything kind of IDE. See this other related question: Using Emacs as an IDE
My vote is KDevelop (I wish I had more points so I can "vote up", so I could just agree with others indirectly than comment).
I've been using Eclipse for about couple years now for personal use, convincing myself that "since IBM donated it, it must be good", but then I've discovered KDevelop and never turned back. Because I'm quite spoiled with Microsoft Visual Studio for professional use, thus KDevelop felt the most comfortable to me.
I want to enjoy programming as a hobby, not spend time looking up what ctrl-k-k and ctrl-k-b does. Like others has mentioned, whatever "feels right" to them is the best IDE. For me, KDevelop feels the most comfortable because I can concentrate on coding (I could probably remap the keys to other IDE's to make it feel like VS, but as mentioned, I rather invest my time coding, which is more fun).
KDevelop is nice, especially if you run KDE. It supports many languages, as an added bonus. I've found its embedded terminal really useful.
If you're coming from Windows & Visual Studio, you might find Code::Blocks meets your expectations.
That was my experience; I tried a few others first, but they all seemed to expect me to do a lengthy tutorial before I could start doing anything interesting - and with a dozen IDEs to try, that could take days.
With Code::Blocks there were no hoops to jump through, and very little mandatory cruft to learn before I could be productive. I still prefer Visual Studio, but Code::Blocks can open my Visual Studio projects, and it doesn't seem to want me to waste any time, so it's the winningmost *nix IDE for me.
I use the NetBeans C++ plugin and it's superb. I come from a Visual Studio background and the Netbeans project management is very similar. I tried KDevelop but found it a little flaky (this was 12 months ago, so it is probably better now).
I also struggled with dependencies using KDevelop - i.e. where a program requires a raft of libs to be built first - but Netbeans made this simple.
The only complaint is that being a Java app, it isn't particularly fast - very noticeable when running under VMWare.
Simply put, Netbeans. You have to try it out. It's so good. It's much better than Eclipse with the CDT plugin.
Netbeans has gotten some pretty good reviews for its C++ support: http://www.netbeans.org/features/cpp/
I've never used Netbeans or Eclipse for C++ development, but it's worth looking at.
I was a VisualStudio + VA-X user before I switched to ubuntu, and needed good auto completion and function navigation features in any IDE.
I have tried Netbeans,Eclipse CDT,CodeBlocks,Geany,Anjuta, KDevelop and finally settled for KDevelop since that was the closest I could get to VS+VA-X.
Eclipse & NetBeans are too heavy & sluggish for my taste. Most of the other IDEs have buggy/incomplete/dumb auto completion & other features; or they want to take control of your code and needs to be imported into projects; or they put 101 files in your source folder. Only KDevelop allowed me to have a simple link to my src folder and let me work. auto completion is not brilliant, but better than the others.
KDevelop doesn't blend well with my Gnome, but I can live with it ;)
I really like CodeLite. Check out it's feature page.
Personally, I agree with the kDevelop crowd as well. Eclipse felt a bit bulky and mildly unstable. Something about kDeveloper just always feel right.
Ultimate++ [http://www.ultimatepp.org/index.html]
[edit]
It does have it's own C++ class libs (as Hernan points out), but nothing stops you from using any other class libs like the SDL, or you can roll your own. You can even use boost if you like, but I must say I find some of the supplied classes & techniques to be more useful.What I appreciate most is it's brilliant integration with the debugger and very complete context-sensitive editor. It uses the standard compiler & debugger (gcc, g++, gdb) on Linux and the MS compiler/debugger on that platform.The only (very small) gripe I have is the home-made names for projects (called Nest's & so forth). That is unnecessary and may even be off-putting to serious developers, but they are only names & I find I can easily ignore it.
I asked this question before to experience Linux users and they always say Vim and automake. I use Vim as my default editor in Linux and after a while it becomes intuitive. I learned it by working through some small examples while learning C++ so I could learn both at the same time.
At my old job we used SlickEdit for C++ development under Debian. It's cross-platform and quite powerful.
It's not free, though.
The problem with most IDEs is that they want to have a certain degree of control on how the project is organized, and this could be a problem if you have to work on that project with other people. In my experience this leads to two series of related problems:
If you start a project in a particular IDE, they will layout for you a particular directory structure, file organization, file naming convention, build system, etc. Of course most of these options are customizable, but it's not always possible to adhere to specific conventions which you might be required to follow. Projects with a complex build system might be difficult to implement from within the IDE. Moreover, the project might not be suitable for external, independent modification; so for instance, if you are planning to write an opensource application, avoid making the IDE a dependency for the project.
If you import a project started elsewhere, chances are it won't be very easy to use all the features provided by the IDE. You will have to figure out how to hook the build system, the debugger (as the binaries might not be where expected), etc. This is especially true for large and complex projects.
The reason why these ares not a problem under Windows is that Visual Studio is a de-facto standard. Under *nix there's a tendency not to impose particular tools/editors when developing a project collaboratively, and this is why these "cross-IDE communication" problems arise.
As a final note, if you learn, say, kdevelop or netbeans, you might have problems if one day you have to work on a machine where installing those is problematic (e.g. you might not have a Java runtime available and you might not be allowed to install it). If you learn (say) Vim + plugins, you are way safer: you can keep your configuration as a .zip file on your webserver and be pretty sure that Vim will always be available everywhere.
I can't really vouch for the Eclipse module, but that might be attributed to the fact that I'm on Windows and have nearly no idea what I'm doing.
Can't go wrong with your favorite text editor though.
Eclipse isn't bad, but you have to do things Eclipse's way. Eclipse has some built in ideas on directory layout. For a new project, Eclipse is a reasonable choice. Importing an existing project into Eclipse may require some restructuring.
I used to use Eclipse under QNX for C++. The QNX people actually developed the C++ capability, so QNX would have an IDE.
Emacs works for simple things but I use Eclipse for any larger project.

What tools do you use to develop C++ applications on Linux? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I develop C++ applications in a Linux environment. The tools I use every day include Eclipse with the CDT plugin, gdb and valgrind.
What tools do other people use? Is there anything out there for Linux that rivals the slickness of Microsoft Visual Studio?
I use a bunch of terminal windows. I have vim running on interesting source files, make and g++ output on another for compiler errors or a gdb session for runtime errors. If I need help finding definitions I run cscope and use vim's cscope support to jump around.
Eclipse CDT is my second choice. It's nice but huge, ungainly and slow compared to vim.
Using terminal windows and vim is very flexible because I do not need to carry 400 MB of Java around with me I can use SSH sessions from anywhere.
I use valgrind when I need to find a memory issue.
I use strace to watch what my software is doing on a system call level. This lets me clean up really stupid code that calls time(0) four times in a row or makes too many calls to poll() or non-blocking read() or things like calling read() on a socket to read 1 byte at a time. (That is super inefficient and lazy!)
I use objdump -d to inspect the machine code, especially for performance sensitive inner loops. That is how I find things like the slowness of the array index operator on strings compared to using iterators.
I use oprofile to try to find hot spots in optimized code, I find that it often works a little better than gprof, and it can do things like look for data and instruction cache misses. That can show you where to drop some helpful prefetch hints using GCC's __builtin_prefetch. I tried to use it to find hot mis-predicted branches as well, but couldn't get that to work for me.
Update: I've found that perf works way better than oprofile. At least on Linux. Learn to use perf and love it as I do.
g++ of course, but also Code::Blocks which is an absolutely fantastic cross platform IDE (Win32, *nix, Mac).
I use the nightly (more like weekly lately) builds from the SVN. It has almost all the bells and whistles you would expect from a modern IDE. It's really a truly fantastic Open Source project.
Also, on Linux you get the joy of using Valgrind which is probably the best memory tracker (it does other things as well) tool that money can buy. And it's free :) Track down memory leaks and more with ease.
And there is just so much more! Linux is such a great dev platform :)
(edit) Just realized you mentioned Valgrind in your question, silly me for reading it too fast.
When develop C++ apps for linux, i prefer using a bunch of cmdline tools.
Vim extended with a lot of plugins.
Gdb with ddd, valgrind, libefence
and SCons (automake is a pain in ... you know where)
g++
emacs
bash command line
gdb-mode in emacs (type M-X gdb)
make
emacs, cmake, gdb, git, valgrind. It may not be as slick as Visual Studio but it works well, and it's easy to add functionality via bash scripting or emacs lisp.
Right now I use Qt Creator. It's cross-platform and integrates pretty nicely with Qt, though (of course) you have the option of creating a standalone application.
g++ and make
I believe KDevelop is what would be the closest from Microsoft Visual Studio.
You get pretty much everything (except unfortunately VS debugger which is indeed a killer).
Its already mature and its development is pretty fast and promising.
It actually implement a few stuff you won't even see in VS. For instance, open header file and cpp file in vertical tile mode, and have the cursor synchronized in both,
ie: when you select a functions prototype, you always have its implementation on your right.
KDevelop is a KDE project, but run on Gnome. Anjuta is an equivalent project on Gnome, but I find it unusable for real work. For the rest of the stack gcc make valgrind ddd (a gdb IDE) and python for scripting my code.
If you're ok to try a different approach than the VS IDE. You may consider trying vim. It takes a long time to get used to it though.
Eclipse CDT is really quite nice. I still have to resort to Emacs from time to time but I really love the indexing, call trees, type trees, refactoring support (thought it's nothing like Java refactoring), etc. Syntax highlighting is quite powerful if you customize it (can have separate colors for local variables, function arguments, methods, etc.). The code completion is really handy too. I've mostly used Eclipse 3.3 but 3.4 is great too.
Also, mostly I'm using this for a somewhat large project (~1e6 sloc) -- it may be overkill for toy projects.
When I developed C++ code on linux, I used emacs as an editor and as a gdb front-end. Later, my company purchased SlickEdit for all of the programmers, which is a nice IDE, maybe not on a par with Visual Studio. We used gdb extensively, with the occasional use of valgrind and gprof. I highly recommend using a scripting language to complement C++ on day-to-day tasks. I went from PERL to python to the current ruby. All of them get the job done and have strengths where C++ has weaknesses. And, of course, you have all the shell commands at your disposal. I daily use sort(), uniq(), awk, etc. And one more recommendation is ack, a grep successor.
You need a standard toolchain + an IDE.
There's nothing much to say about the standard toolchain. Just install e.g. on Ubuntu/Debian via
aptitude install build-essential
The interesting part is about an IDE.
My personal impression is that nowadays - in the 21th century - vi/emacs/make/autotools/configure is not enough for developing software projects above a certain size (... and yes, please please please blame me for the heritage heresy ...).
Which IDE to choose is simply a matter of taste. You will find a lot of threads on SOF. Here is a permalink discussing which C++ IDE might be the "best": C++ IDE for Linux.
I use the NetBeans C++ plugin, which is superb and integrates with CVS and SVN. The project management side is also very good. I was up and running with it in minutes. It's an impressive IDE but being Java, can be a little sluggish.
GCC
GHC
Vim
Cmake
cscope
GDB
Valgrind
strace
git
Is there really anything else you could possibly need?
Bash
Vim
Make
G++
GDB
Valgrind
Gprof
svn
Never a GUI to be seen except a good terminal with tab support; keep code, debugger, output, etc all in separate windows and tab back and forwards really quickly.
In addition to many already listed, we use the autoconf toolset for deploying our program to users.
CMake
vim
g++
kdevelop (compiled from SVN daily!)
Mercurial when I can, SVN when I have to, git when there's really no other choice (contributing to project that uses it)
valgrind
Anjuta is a nice idea that makes Linux C++ dev quite enjoyable as well.
I'm another for KDevelop. It has a very diverse set of tools. I'm not real familiar with VS and whether or not it has integrated console access via its interface, but KDevelop can allow you to run a konsole inside the IDE, which I always find very useful. You could always give Netbeans a go now that it has full C/C++ support.
Other than that, I make good use of gdb and its gui-based version ddd for problems with the code or other bugs. For throw-away programs, like others that already posted - I use g++ at the terminal and make for some larger projects.
Eclipse CDT for editing, SVN for source control, SCons for build management, CruiseControl for automated builds and a proprietary unit test framework.
I use Eclipse+CDT on Windows and Cygwin + g++ to cross compile for Linux.
(Cross compilers are built using crosstool, a nice script-set for generating cross compilers)
Mi first choice is allways emacs with a lot of plugins: ecb gives some buffers to navigate on the folders, gdb, svn or git integration... This is mi first choice using Python too.
As a second choice, Netbeans with C++ plugin, is very simple and quite powerfull, but too heavy I think.
I use whatever is on the system. I prefer Eclipse CDT as an editor, and g++ as a compiler. However, if eclipse is not an option I use vi, which is fine as well.
The Eclipse incubation project Linux Tools integrates C/C++ Development tools.
It's a GUI plugin to integrate tools like Valgrind, GProf, GCov, SystemTap etc into the Eclipse C++ CDT IDE.
Search for Eclipse Helios IDE for C/C++ Linux Developers (includes Incubating components), (120 MB)
Found this after trying to build Linux Tools using the .psf file available.
Thankfully found this package hiding right at the bottom of the Helios packages download page.
Note that this is an incubation project so you can expect the support to only get better with time.
See Also:
For updated info on installing and using Eclipse Linux Tools Click Here
FlexeLint for static code analysis, in addition to mentioned above:
Eclipse with CDT, gcc, make, gdb, valgrind, bash shell.
Source version control: Clearcase or git, depending on project.