C++ IDE for Linux? [closed]

2018-12-31 09:22发布

I want to expand my programming horizons to Linux. A good, dependable basic toolset is important, and what is more basic than an IDE?

I could find these SO topics:

I'm not looking for a lightweight IDE. If an IDE is worth the money, then I will pay for it, so it need not be free.

My question, then:

What good, C++ programming IDE is available for Linux?

The minimums are fairly standard: syntax highlighting, code completion (like intellisense or its Eclipse counterpart) and integrated debugging (e.g., basic breakpoints).

I have searched for it myself, but there are so many that it is almost impossible to separate the good from the bads by hand, especially for someone like me who has little C++ coding experience in Linux. I know that Eclipse supports C++, and I really like that IDE for Java, but is it any good for C++ and is there something better?

The second post actually has some good suggestions, but what I am missing is what exactly makes the sugested IDE so good for the user, what are its (dis)advantages?

Maybe my question should therefore be:

What IDE do you propose (given your experiences), and why?

标签: c++ linux ide
30条回答
骚的不知所云
2楼-- · 2018-12-31 10:11

For me Ultimate++ seems to be the best solution to write cross-os program

查看更多
永恒的永恒
3楼-- · 2018-12-31 10:11

Initially: confusion

When originally writing this answer, I had recently made the switch from Visual Studio (with years of experience) to Linux and the first thing I did was try to find a reasonable IDE. At the time this was impossible: no good IDE existed.

Epiphany: UNIX is an IDE. All of it.1

And then I realised that the IDE in Linux is the command line with its tools:

  • First you set up your shell
  • and your editor; pick your poison — both are state of the art:

Depending on your needs, you will then have to install and configure several plugins to make the editor work nicely (that’s the one annoying part). For example, most programmers on Vim will benefit from the YouCompleteMe plugin for smart autocompletion.

Once that’s done, the shell is your command interface to interact with the various tools — Debuggers (gdb), Profilers (gprof, valgrind), etc. You set up your project/build environment using Make, CMake, SnakeMake or any of the various alternatives. And you manage your code with a version control system (most people use Git). You also use tmux (previously also screen) to multiplex (= think multiple windows/tabs/panels) and persist your terminal session.

The point is that, thanks to the shell and a few tool writing conventions, these all integrate with each other. And that way the Linux shell is a truly integrated development environment, completely on par with other modern IDEs. (This doesn’t mean that individual IDEs don’t have features that the command line may be lacking, but the inverse is also true.)

To each their own

I cannot overstate how well the above workflow functions once you’ve gotten into the habit. But some people simply prefer graphical editors, and in the years since this answer was originally written, Linux has gained a suite of excellent graphical IDEs for several different programming languages (but not, as far as I’m aware, for C++). Do give them a try even if — like me — you end up not using them. Here’s just a small and biased selection:

Keep in mind that this list is far from complete.


1 I stole that title from dsm’s comment.

2 I used to refer to Vim here. And while plain Vim is still more than capable, Neovim is a promising restart, and it’s modernised a few old warts.

查看更多
宁负流年不负卿
4楼-- · 2018-12-31 10:12

My personal favorite is the CodeLite 2.x IDE.

see: http://www.codelite.org

The decision to use CodeLite was based on a research regarding the following C++ IDE for Linux:

  • Eclipse Galileo with CDT Plugin
  • NetBeans 6.7 (which is also the base for the SunStudio IDE)
  • KDevelop4
  • CodeBlocks 8.02
  • CodeLite 2.x

After all I have decided to use CodeLite 2.x.

Below I have listed some Pros and Cons regarding the mentioned C++ IDEs. Please note, that this reflects my personal opinion only!

EDIT: what a pity that SOF doesn't support tables, so I have to write in paragraphs ...

Eclipse Galileo with CDT Plugin

Pros:

  • reasonable fast
  • also supports Java, Perl(with E.P.I.C plugin)
  • commonly used and well maintained
  • also available for other OS flavours (Windows, MacOS, Solaris, AIX(?))

Cons:

  • GUI is very confusing and somewhat inconsistent - not very intuitive at all
  • heavy weight
  • Only supports CVS (AFAIK)

NetBeans 6.7 (note this is also the base for the SunStudio IDE)

Pros:

  • one of the most intuitive GUI I have ever seen
  • also supports Java, Python, Ruby
  • integrates CVS, SVN, Mercurial
  • commonly used and well maintained
  • also available for other OS flavours (Windows, MacOS, Solaris)

Cons:

  • extremly slow
  • heavy weight
  • uses Spaces for indentation, which is not the policy at my work. I'm sure this is configurable, but I couldn't find out how to to that

KDevelop4 (note: I did not much testing on it)

Pros:

  • commonly used on Linux
  • integrates CVS, SVN, Mercurial

Cons:

  • the GUI looks somewhat old fashioned
  • heavy weight
  • very specific to the KDE environment

CodeBlocks 8.02 (note: I did not much testing on it)

Pros:

  • reasonable fast

Cons:

  • the GUI looks somewhat old fashioned (although it has a nice startup screen)
  • the fonts in the editor are very small
  • some icons (e.g. the debugger related icons starting/stepping) are very small
  • no source control integration

CodeLite 2.x (note: this is my personal favorite)

Pros:

  • the best, modern looking and intuitive GUI I have seen on Linux
  • lightweight
  • reasonable fast
  • integrates SVN
  • also available on other OS flavours(Windows, MacOS, Solaris(?))

Cons:

  • no CVS integration (that's important for me because I have to use it at work)
  • no support for Java, Perl, Python (would be nice to have)
查看更多
只靠听说
5楼-- · 2018-12-31 10:13

And then I noticed that this simply isn't how you work there*, and I threw everything out, spent a few days reading manuals, set up my shell (bash), set up a GVIM environment, learned the GCC/binutils toolchain, make and gdb and lived happily ever after.

I'd mostly agree, but the problem is also one of perception: we forget how difficult it was to become productive in any chose IDE (or other environment). I find IDE's (Visual Studio, NetBeans, Eclipse) amazingly cumbersome in so many ways.

As an old-time UNIX guy, I always use Emacs. But that has a pretty steep and long learning curve, so I'm not sure I can recommend it to newcomers.

I'd second that; use Emacs as my primary editor on both Linux and on MSW (XP2,W2K). I would disagree that it has a steep learning curve, but would say that because of the huge number of features it has a long learning curve. You can be productive within a short time, but if you want you can learn new features of it for years to come.

However -- don't expect all the features of Emacs to be available on drop-down menus, there is just too much functionality to find it there.

As I metioned, I've used GNU Emacs on MSW for years. And it's always worked well with Visual Studio until I "upgraded" to 2008; now it sometimes delays many seconds before refreshing files from disk. The main reason for editing in the VS window is the "Intellisense" code completion feature.

查看更多
ら面具成の殇う
6楼-- · 2018-12-31 10:13

Not to repeat an answer, but I think I can add a bit more.

Slickedit is an excellent IDE.

It supports large code-bases well without slowing down or spending all its time indexing. (This is a problem I had with eclipse's cdt). Slickedit's speed is probably the nicest thing about it, actually.
The code completion works well and there are a large amount of options for things like automatic formatting, beautification and refactoring.
It does have integrated debugging.
It has plug-in support and fairly active community creating them.
In theory, you should be able to integrate well with people doing the traditional makefile stuff, as it allows you to create a project directly from one, but that didn't work as smoothly as I would have liked when I tried it.
In addition to Linux, there are Mac and Windows versions of it, should you need them.

查看更多
低头抚发
7楼-- · 2018-12-31 10:15

Sun Studio version 12 is a free download(FREE and paid support available) -- http://developers.sun.com/sunstudio/downloads/thankyou.jsp?submit=%A0FREE+Download%A0%BB%A0.

I'm sure you have code completion and debugging support including plugin support in this IDE.

Sun Studio is available for Linux as well as Solaris. forums : http://developers.sun.com/sunstudio/community/forums/index.jsp. Sun Studio Linux forums : http://forum.sun.com/forum.jspa?forumID=855

I'll be eager to hear your feedback on this tool.

BR,
~A

查看更多
登录 后发表回答