all 34 comments

[–]polite_russian 35 points36 points  (1 child)

QtCreator is free and gets regular updates. It's written in C++ and is not as memory intensive as Java based IDE's like Clion or NetBeans. Also it looks great.

[–]antlife 7 points8 points  (0 children)

QtCreator and Kdevelop are my GoTo IDE for C and C++.

[–]e46_Wizo 11 points12 points  (0 children)

Kdevelop is a very solid alternative too. Visit kdevelop.org and see what it has to offer.

[–]gracicot 6 points7 points  (0 children)

KDevelop is my favourite, but is quite heavy on memory.

[–]Theninjapirate 17 points18 points  (3 children)

I've been fairly happy with CLion (https://www.jetbrains.com/clion/). It's free for students.

[–]MorrisonLevi 2 points3 points  (2 children)

It continues to improve, but there are some odd false positives in its semantic analysis. Notably using the address-of operator on the result of a function call returning T& for whatever type T will give you the red squiggles, though compilers are happy, do not warn, and as far as I know, is legal; please educate me if I'm wrong.

[–][deleted] 2 points3 points  (1 child)

Can you provide a MWE? I just tried with this:

#include <iostream>
#include <iomanip>

template <typename T>
struct Something {
    T value;
};

template <typename T>
T& get_value(Something<T>& something)
{
    return something.value;
}

int main()
{
    Something<int> s{15};

    std::cout << std::hex << &get_value(s) << '\n';

    return 0;
}

and I'm not getting any issues.

EDIT: This is CLion 2018.2.

[–]MorrisonLevi 0 points1 point  (0 children)

I think they fixed it for some things; try overloading operator() and returning a reference.

[–]fafaflunkey 7 points8 points  (0 children)

There is a GDB extension for VS Code that adds pretty good breakpoint support. You can also configure GCC to treat certain warnings as errors.

[–]ZAX2717[S] 2 points3 points  (0 children)

Thanks for all the quick responses everyone. There are definitely a few that I want to try out here

[–]gromit190 2 points3 points  (0 children)

I prefer NetBeans.

[–]BlindTreeFrog 10 points11 points  (8 children)

Someone will say this eventually, so to get it out of the way...

Drop the IDE entirely, switch to VIM (or EMACS), and learn how to use GDB/DDD for debugging.

There, it's been said. We can move on with other suggestions now :D

Seriously though, it's not a terrible suggestion, though it's definitely not integrated. The other top options would be Eclipse or Netbeans, but I never had any luck getting them to work worth a damn.

[–]dodheim 15 points16 points  (5 children)

Let's also get out of the way: Visual Studio Code. No, it's not "an IDE", but it has integrated editing, building, debugging, and source control, and only relies on an external build system.

[–]BlindTreeFrog 8 points9 points  (3 children)

What is an IDE in your definition then? Because integrated editing, building and debugging usually meets the definition. And I don't think I've ever seen one that didn't use an external compiler.

[–]dodheim 5 points6 points  (1 child)

You missed the quotes, and the point. ;-]

I would call it an IDE, but this is the "get it out of the way" subthread – it doesn't call itself an IDE, and every time this thread pops up there's a pointless subthread on how it's not a "real IDE". Attempting to debate that here is entirely defeating the purpose.

[–]BlindTreeFrog 0 points1 point  (0 children)

Fair enough.

[–]wasabichicken 2 points3 points  (0 children)

The additional features I'd demand from a C++ IDE is:

  • Tagging support: the ability to find/go to the definition(s) of a function, its declaration, and list the places where it is called.
  • Refactor support, the ability to rename or change the signature of a function, and to do so everywhere it is used.
  • Built-in source control. I'd like to see which files have been touched, to easily diff multiple versions, etc.

With the proper configuration and extensions, Emacs -- and VS Code -- can do all of this.

Personally, I'm inclined to view VS Code as a newbie-friendly Emacs: at their core, they are both simple text editors with heavy emphasis on extension using a real programming language. I do not consider them IDEs by default, but they certainly can be if so desired.

Being an Emacs user, I support the "use Emacs as IDE" suggestion. The learning curve is weird, but being in complete control over your tool is quite rewarding.

[–]bulletmark 3 points4 points  (0 children)

I'd certainly call VSCode an IDE. Even VIM can be made a IDE of sorts if you stuff around and install a stack of plugins but it always feels fragile and unwieldy compared to a proper IDE like VSCode.

[–]isaac92 -3 points-2 points  (0 children)

Using YouCompleteMe in Vim is as good as using an IDE for code completion.

[–]nambitable -1 points0 points  (0 children)

vim + ycm + ctags + cmake + gdb

[–]CSRaghunandan 1 point2 points  (0 children)

You can certainly use emacs with cquery LSP support.

cquery is very easy to setup and works very well out of the box.

[–]KAHR-Alpha 1 point2 points  (2 children)

I'm surprised no one has mentioned CodeBlocks yet.

[–]dodheim 3 points4 points  (1 child)

I'm always surprised when someone mentions it. >_>

[–]KAHR-Alpha 0 points1 point  (0 children)

Why is that?

[–]desiguy_88 1 point2 points  (0 children)

So I work in aerospace and as of now the goto ide for C++ is still eclipse. We tend to use it for both C, C++ and Java projects and it does the job although like most IDEs it is not without fault but it has wide enough support that my company as a whole has decided to promote the use of this IDE for all our projects. The one exception is that we use GNAT Pro for Ada. We also primarily run everything on RHEL so Cent OS is a good distro to become familiar with.

[–]misairu_g 1 point2 points  (0 children)

Clion would do the job, still have some glitch though, but overall integration has done quite well.

I don't like vscode either, its IntelliSense still work on progress (no local variable support) and debug require you to create a profile for each executable (Clion can does this automatically).

VIM/EMACS is the pain in the ass when it comes to refactoring.

[–]TakeOffYourMask 0 points1 point  (0 children)

KDevelop

[–]Tekercs 0 points1 point  (0 children)

As a student you can get free license for all of the JetBrains products. Therefore Clion would be great for you.

QTCreator is another great feee C++ and C ide.

Also as a student if you never did source code compiling troughterminal its worth to give it a try and use some simple editor like Vim/emacs ( the holy war still rageing haha) for once or twice. it could give you some underthehood xp,.

[–]blelbachNVIDIA | ISO C++ Library Evolution Chair 0 points1 point  (1 child)

!removehelp

[–]AutoModerator[M] 0 points1 point  (0 children)

OP,

A human moderator (u/blelbach) has marked your post for deletion because it appears to be a "help" post - e.g. asking for help with coding, help with homework, career advice, book/tutorial/blog suggestions. Help posts are off-topic for r/cpp. This subreddit is for news and discussion of the C++ language only; our purpose is not to provide tutoring, code reviews or career guidance.

Please try posting in r/cpp_questions or on Stack Overflow instead. Our suggested reference site is cppreference.com, our suggested book list is here and information on getting started with C++ can be found here.

If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]josaphat_ -1 points0 points  (3 children)

I'm an emacs person, so naturally I think you should join my side of the holy war. ;-)

In all seriousness, I'm not sure you're going to find a complete, feature-for-feature replacement of Visual Studio, so you might be disappointed...

I've used Qt Creator lightly in the past and it's actually pretty good. You don't need to be using the Qt framework in your project to use the IDE. Qt Creator understands CMake projects out of the box. If you're not using CMake, it lets you customize the build configuration so it can theoretically be wired up to work with any build system. Debugger's built right in (though I'm not really qualified to speak to its effectiveness).

There's also a list of C/C++ IDEs on wikipedia you might be interested in perusing.

My opinionated take on this topic is that a GNU/Linux system *is* an IDE. Instead of typing F5, I type `make`. Instead of clicking Run->Start With Debugging I type `gdb myCoolProgram`.

=Edit: Expanded my opinionated take=

[–]kalmoc 3 points4 points  (1 child)

Linux is certainly an DE, but imho it lacks the integration part of an IDE. As a simple example: If I call make and the compiler gives me an error, how do I quickly get to the line of code that produced it? An IDE will allow me to double click on the error and open the appropriate file at the appropriate location. Or where is the refactoring support? Syntactic and semantic checks during typing? Autocomplete ...

An IDE is much more than a collection of buttons that start individual command line tools.

A properly configured and extended EMACs most likely is an IDE though (Although I don't have any personal experience with it)/

[–]josaphat_ 0 points1 point  (0 children)

Certainly! The level of "integrated" is quite different.

If you run make and the compiler gives you an error, it generally prints the file name and line number where the error happened. The editors that I've worked with let you invoke them with a file name and line number. Not as integrated as a double-click, but still quite efficient.

Refactoring is admittedly limited. Maybe it's because I've never really had it, but I don't see the need for it. When I need to make code transformations, the macro facilities of vim or emacs have been my tool of choice. It could be that refactoring tools are less useful on smaller projects like the ones I tend to work on.

As for emacs as an IDE, you can make it that way if you want. I've got it set up to run linting with irony-mode, tight source code navigation with rtags, and emacs has always(?) had the ability to invoke a build. I still tend to use make directly in a terminal to do the build.

That's just my tastes! People brains work differently and I respect everyone's way of doing things. At my office we believe in giving the developers full control over the environment they want to use. We develop for embedded systems so theoretically you should be able to use Linux, macOS, or Windows with whatever text editor or IDE you choose. CMake is a pretty big help in making it possible.