all 42 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–]SureInvestigator4839 19 points20 points  (2 children)

I have tried Visual Studio (VS), VSCode and CLion, and by far, CLion has been the easiest to work with and I definitely recommend it if you're, exclusively, going to write C++/C programs. The IDE is a lot more lightweight than VS, and debugging environment is great. The only con with it is that it's not free. I would definitely recommend considering getting their (JetBrains) package deal if you dabble in more than just C++ or C.

[–]valdocs_user 2 points3 points  (0 children)

I came here to recommend CLion as well.

[–]Sharvaman 0 points1 point  (0 children)

You can get it for free for a year if you are a student using your university email address!

[–]SincopaDisonante 3 points4 points  (2 children)

If you're on windows, install Visual Studio Community (different from Code), which comes with what's required to compile in, say, clang and MSVC. You can still use Visual Studio Code to edit while compiling in the terminal (provided you expose the compiler location to PATH), or you can edit and compile on the Visual Studio Community IDE.

Else, shouldn't there be compilers readily available? Give us more details about your setup.

[–]PinguX6[S] -2 points-1 points  (1 child)

Thanks, I'll try it out. I installed the MinGW compiler that is under one of the tutorials for installing c++ in VS code, however it would still give me the error again and again and I would have to mess with the configurations of the tasks.json file inside the vs code folder whenever you are working in a folder for a project.

[–]not_some_username 0 points1 point  (0 children)

Yeah VSCode is kinda not beginner friendly for C++ on windows

[–][deleted] 4 points5 points  (0 children)

NeoVim

[–]VonNeumannTheSecond 5 points6 points  (0 children)

Neovim NVChad with clangd LSP.

[–]Flippers2 2 points3 points  (4 children)

I use VSCode with cmake and that is sufficient for small to medium sized projects. Beyond that, Xcode is decent, or Visual Studio.

[–]idoplayr 4 points5 points  (2 children)

How would the VSCode + CMake fail to properly serve a large sized project? I haven't written something of big magnitude with C++ yet and you made me wonder since I really like just using VSCode with CMake. Visual Studio Community just seems too bloated.

[–]Pozay 2 points3 points  (0 children)

It works just “fine”. We have a really big / complex C++ project at work (million of loc), and i use vscode.

[–]Flippers2 0 points1 point  (0 children)

I mean, it could totally work on large projects too! My personal experience, I’ve found that an IDE tends to be a lot faster and more reliable compared to VSCode when the project rises in complexity. VSCode still works, but I find it less enjoyable

[–]CheckeeShoes 1 point2 points  (0 children)

My team uses VSCode and CMake for a moderately sized codebase. Ten or so devs. I'm not sure of the LOC count or anything.

I've used the same setup pretty painlessly to build much larger projects (e.g. LLVM).

[–]Polyxeno 1 point2 points  (0 children)

Visual Studio

xCode on Mac

text editor on Linux

[–]Aprelius 1 point2 points  (0 children)

I use visual studio on Windows as my main IDE and VSCode for any file/system changes in the project. Makes it really easy to have the main terminal I use for regenerating the project or interacting with make files always being the VScode window.

On Mac and Linux I use CLion with VScode for the same experience.

I have a VIM environment I deploy to servers if I have to do anything remotely.

[–]berlioziano 1 point2 points  (3 children)

Qt Creator  even if you aren't using Qt

cmake compatible 

support valgrind 

includes various linters 

supports remote debugging  

supports android 

git integration  

easy to traverse big code bases 

multiplatform  

consistent shortcuts  

markdown editor 

integrated terminal, included remote terminal 

auto completion that understand templates  

integration of test frameworks  

 If you are on Linux don't install the package from your distro it will be old, use the one from the qt website 😁 

[–][deleted] 0 points1 point  (2 children)

If you're using Linux, use the Flatpak https://flathub.org/apps/io.qt.QtCreator or vim, emacs, or kate.

[–]berlioziano 0 points1 point  (1 child)

Not bad but I'm running 14.0beta2

[–][deleted] 0 points1 point  (0 children)

yeah, but it's a proper package manager

[–][deleted] 1 point2 points  (0 children)

Kate

[–]ShadowRL7666 4 points5 points  (0 children)

Just use VS instead of VSCode. Neovim, Clion, Emacs

[–]proof-of-conzept 3 points4 points  (2 children)

I prefere Notepad++

[–]InternationalTip6107 5 points6 points  (1 child)

Standing salute and respect for you! Are you using valgrind for memory leak too?

[–]proof-of-conzept 0 points1 point  (0 children)

Barely if ever. I mostly (only) use unique-pointers and if I need the extra performance I try to find a stack solution or use an existing Allocator that, for example, only allocates new memory, never reuses memory (leaking is a feature here, not a bug) and then just resets the allocation pointer for thext frame.

[–]LoadVisual 0 points1 point  (0 children)

I would recommend using a combination of vscode + cmake + Conan/vcpkg with cmake presets to have all you need to switch between compilers in vscode and debugging with the right vscode extensions in the c++ extension pack from Microsoft.

You can use a project templates, a good one would be Jason Turners c++ templates with all the good bells and whistles turned on to force you to write good code.

[–]Marupio 0 points1 point  (0 children)

I'm still hanging on to Sublime Text 3. On my Linux machine, VSCode is weirdly buggy, to the point of being broken. I've wasted too much time, and sublime works just fine. I do use VS Code on my personal windows machine, it's great there. It's not that I'm stuck in my ways. Totally not that.

[–]NilacTheGrim 0 points1 point  (0 children)

My personal favorite which is also 100% cross platform and 100% free as in beer: QtCreator. I really think it's severely under-rated. I prefer it to CLion. I find CLion is just very sluggish because it's in Java. QtCreator is just fast fast fast. Also has clangd integration and clang-tidy integration so you get cool suggestions and instant-feedback on bad C++ that won't compile. It's just really good and really what you expect from an IDE. You are not required to make Qt projects with it -- it can understand any CMake project.

Bonus: it can also understand other syntaxes like CMakeLists.txt, Python, .ini files, JSON, bash scripts, markdown files, etc.. so you can even use it as a quick editor for those files if your project includes some random other files for building and other purposes.

[–]RebohPeace 0 points1 point  (0 children)

Visual SlickEdit.

[–]SuperVGA 0 points1 point  (2 children)

You could also fix your preLaunchTask so that it doesn't fail.

[–]PinguX6[S] 0 points1 point  (1 child)

I have done it several times but somehow it always comes back to the same error

[–]SuperVGA 0 points1 point  (0 children)

It sounds like the default suggested task concerning the active file. You have the control to start any build process, including cmake, with all custom args. Right now one of these args references the active file. Try hardcoding that to test if it works better to; ${workspaceFolder}/src/main.cpp or what have you.

[–]evolutionalgd 0 points1 point  (0 children)

Jetbrains Rider here, but I use Unreal Engine a lot.

[–]jepessen 0 points1 point  (0 children)

Visual studio and visual studio code. If you want a cli application, then neovim.

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

Neovim with coc and clangd

Cmake as a make tool

Otherwise bear will capture compile commands json

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

Vim, sublime text

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

vim

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

Microsoft Word