What tools do you use to develop C++ applications 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 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.

Related

C++ IDE 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 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/

Setting up a Programming Environment in 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 recently started using Linux as my primary OS. What are the tools that I will need to set up a complete programming environment in Linux for C and C++?
Standard stuff:
The compiler tools, gcc, gdb, etc.
Some sort of editor/IDE (emacs, vim, eclipse)
Profiling tools
Source Control (SubVersion, git, etc)
Language specific tools, like easy_install for python (you said C/C++, but the same goes for everything)
A web server maybe? Apache, Lighttpd, nginx
Any libraries you'll be using. Are you doing kernal hacking? Driver development? opengl?
Among others you should also have gprof and valgrind ( or something in it's class ).
Vi (or emacs), gcc , make
Tradiationally unix development is more commandline than ide. There are very good IDEs, the main ones are probably eclipse and kdevelop
It depends on your definition of "Complete programming environment", and whether you are using C, C++, or both (C/C++ is an awful term that shouldn't be used. Either it's C, or C++).
If you are looking for an IDE, Eclipse/CDT is the most highly-recommended one from my experience (I don't actually use any IDE, so I can't offer first-hand advice).
If you can cope with command-line control (and in the end I find it makes things easier to do and doesn't take a whole lot of getting used to), a simple text editor with highlighting will suffice. I prefer KATE (part of KDE), as it features a built-in terminal as well as many features you would expect from an editor inside an IDE, like code folding and regex search/replace.
Many people also recommend Vim or Emacs, both of which are probably available through your distro's repositories. (Eclipse is probably available too, but in my experience the CDT is confusing to install via packages. YMMV). They are both ancient editors; and there is a powerful holy war between the two, so I won't get involved.
Your compiler should probably be GCC - on a Debian system, installing the g++ package as well as build-essential should be enough to get C++ going (build-essential should contain the gcc package required for C development). Whatever your distro, GCC is probably easily available or else already on your system.
Seconding swilliams, I'd say the basics are:
an editor or IDE (I use vim),
a compiler (almost certainly gcc)
make, or maybe some other similar tool like ant if you want
a debugger (almost certainly gdb)
source control (I use subversion)
Standard unix utilities like grep and diff, but you have those already
Other than that, I'd say install as you go. Linux is more about little utilities that each do one thing than monolithic development environments that do everything. So if you find yourself needing something, you can always just install it, be that thing a memory profiler, a documentation generator, a bigger/smaller/more different editor, et cetera, et cetera.
What distribution are you running?
In Ubuntu or any Debian based distribution you can issue the following command to install all the necessary tools.
sudo apt-get install build-essential
From there you can install your SCM solution of choice and an IDE if you prefer or just use your favorite text editor.
The simplest of answers is an editor (take your pick - at least one is already on there) and gcc/g++.
If you want an IDE, there are a slew of questions related to that on SO :) (including this one C++ IDE for Linux?).
Kdevelop is a well regarded and well written IDE for Linux, installing it should get you every other tool you might want to develop with installed as well and and IDE to go with it.
By "every other tool" I mean gcc, grep, diff, autoconf et al should be grabbed by the package manager and installed at the same time, but I could be wrong. I don't have a standard distro on hand to test that with.
Personally, I use vim, but I have used kdevelop in the past.
vim/vi is handy because you know that some form of vi is always available on every unix platform.
I have to correct my post. I just looked at the package requirements for kdevelop on ubuntu... it does NOT appear to require gcc and install it automatically
If you want something very easy to use, with ability to import visual studio projects, and a feel much like VS, give Codeblocks a try. Its quick ( since its not Java based ) and in general works well.
Another great utility that you can use are *nix man pages. Each function in the C library has an associated man page.
For example:
man printf
man strncpy
...
I took an old windows laptop with a dead hard drive and
replaced the hard drive then installed Ubuntu (linux / debian
all in one handy release) on it. I had to burn the ubuntu
installation files onto a cd first on another working computer.
Here's where I got my linux from (complete with desktop gui, very
easy to install, lots of programs to use, it was my first linux
but not my first unix):
http://www.ubuntu.com/getubuntu/download
Then i installed Netbeans for my integrated development environment (IDE)
altough I am using it for java -- but it comes with c++ support as shown below:
http://www.netbeans.org/features/cpp/
I also installed mySql, you didn't ask, but that is another key component
that completes my development environment.
Good luck to you.
On most distros, everything you need will be installed by default (very few don't include gcc, they all include some kind of editor). I generally do my development in Vim (or gVim, which is the graphical version -- the best of both worlds). For those times when I'm feeling the need for a "real" IDE, Eclipse with the Vim plugin is really nice. It's almost like working in Vim, except you get the Eclipse stuff -- again, best of both worlds. The Vim plugin for Eclipse that I'm using is not free, however :( I believe there is a free one, but the last time I tried it, it wasn't very good.
Personally I use Ubuntu w/ Eclipse CDT. Eclipse is what most people might think of as a Java IDE, but CDT is a set of extensions that really tune it for C/C++ development. It's smart enough to figure out what toolset to use (MacOSX GCC vs Linux GCC, for example).
Eclipse CDT Website
For best results, currently the 6.0 JRE for Ubuntu seems to have problems with recent Eclipse versions, so what I did was remove the 6.0 JRE and run:
apt-get install build-essential
sun-java5-jre sun-java5-bin
Then grab the latest Eclipse from the website, unpack it in a directory.
As a final touch, edit the eclipse.ini file that comes with Eclipse and add this line to it:
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
This will further stabilize the app, making it as rocksolid as Windows or Mac.
If you prefer commandline tools over GUI tools, some ones I use regularly:
CMake -- Portable build tool. It's easy to use and can output a variety of formats like Makefiles or Visual Studio files.
apt-get install cmake
Vim -- VI improved, if you want a text editor with some bells and whistles. Otherwise, just use 'nano', which comes with Ubuntu.
apt-get install vim
Twe options, you must make your decision now and never look back, or risk being burned at the stake:
a. Emacs
b. vi(m)
Do not listen to any rational arguments before choosting... listen to the light inside yourself...
Install a lot of bell a whistles for the editor you choose, vi is usable but no fun.
vim is fun, but vim with extras is great.
(And the same is true for Emacs even if that means installing tetris and a doctor ;-) )
/Johan
Two must haves are guake and pithos. I cant see how any one can have a list of dev tools without these.

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

Linux C++ Debugger

I'm looking for the perfect Linux C++ debugger. I don't expect success, but the search should be informative.
I am a quite capable gdb user but STL and Boost easily crush my debugging skills. It not that I can't get into the internals of a data structure, it's that it takes so long I usually find another way( "when in doubt, print it out" ).
The macro language for gdb is weird and not very adaptive. Just look at the code for the stanford gdb utils to print out stl structures.
In short I'm unhappy with what I've got.
I recently stumbled upon Zero Bugs. It looks like a silver bullet. What do the current Zero Bugs users think of it?
Has anyone found other good solutions to the Linux C++ Debugger problem?
A development branch of gdb (part of gdb's Project Archer) adds Python support to gdb (to replace gdb's macros). There's a series of blog postings starting here that extensively covers getting started with Python-enabled gdb and offers several tutorials on using Python for defining new gdb commands and pretty printing of C++ data structures.
UndoDB is amazing if you don't mind paying for it. The reversible capability is much much faster than GDB's. http://www.undo-software.com/
There are simple scripts which let you dump STL structures from GDB.
Take a look here
You can try NetBeans IDE 6.5 with gdb 6.8, it is quite powerful!
http://www.netbeans.org/downloads/index.html
ddd (data display debugger)is quite good.....it is basically a visual gdb....
I use the following environment:
http://ec-lang.org/
It is a complete development environment for the eC language.
However, you can have a project with just c or c++ files without any eC specific files and build and debug them using the IDE.
This is the closest you will ever come to a "Borland C" like experience under linux.
It can be installed on Ubuntu/Debian with the following command:
sudo apt-get install ecere-sdk
Recentg gdb (e.g. version 8.1) and g++ (e.g. GCC 7, in february 2018) are able to debug standard C++ containers thru Python scripts.
I haven't done C++ development in Linux for a while now but when I did I had good luck when KDevelop's debugger. Nothing revolutionary but it let you quickly explore object properties like you are looking for.
Try ddd.
You can use Eclipse to step through C and C++ code if you are looking for an IDE type of debugger instead of a command-line debugger. It isn't perfect, but I've found it to work well for people already familiar with IDE debugging tools.
I am also partial to Valgrind for detecting memory errors.

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.