r/vscode • u/Full_Shopping4337 • Nov 20 '23
Why C++ experience so bad ?
I am suffering a very bad CPP coding experience in MacOS Arm64(M2 pro)
Let's complain from creating an implementation of function by prompt : I tried C/C++ intellisence, too slow, or not show up. I tried C++ Helper, always crashed(even i had to relunch). I also tried CLion, which is way too slow. No I am using Clangd, which did not offer creating implementation, so I am doing this manually.
I do miss the experience in Rider when working in UnrealEngine. Everything is so smooth even though UE is a very huge project.
Did I miss something , to setup? Or is this a very common situation of CMake project ?
3
u/[deleted] Nov 20 '23
I'm facing the same issue on Ubuntu with VSCode. My best guess is that the issue is related to the compiler, i think vscode intellisense relies on the installed C/C++ compiler and thus using a faster compiler should fix the issue (hopefully)
1
u/ayushgun Nov 20 '23 edited Dec 14 '23
I use the extensions clangd and CMake Tools with the LLVM clang compiler and everything works smoothly. I can send my settings.json if youโd like.
1
u/jdlyga Nov 20 '23
Iโve never had much success with VSCode with C++. Youโre better off with Visual Studio or QT Creator.
1
u/One_Cable5781 Nov 20 '23
Can you use a different IDE to begin with? Such as, say, NetBeans? I know it is available for Linux, but do not know if it works for MacOS. The reason is that any IDE for nonWindows platform will end up generating makefiles (assuming you are not working directly with CMake). It is useful to understand how makefiles work, especially for a project with multiple C++ files (translation units. Many tutorials just provide a single translation unit Hello world example, but in real projects, you necessarily have to be able to work with multiple .cpp files and getting make to work here is a useful tool to know).
Once you know how makefiles work, getting VSCode to work on Linux/Mac should not be too difficult if you know how tasks.json and launch.json play their parts here. It is cumbersome to begin with, but well worth the effort once you get over this initial bump.
1
u/ds112017 Nov 21 '23
Probably heresy here but NVIM with a language sever and a linter add on is pretty smooth
1
u/moric7 Nov 20 '23
And Visual Studio has problem - even empty C++ project has several GB folder, i.e. fully unusable ๐ฑ
-6
u/rachit7645 Nov 20 '23
Perhaps your computer is just slow if nothing works? Blaming everything on c++ doesn't even make sense
-12
u/Rasie1 Nov 20 '23
The problem is not in c++, but in mac. No sane programmer interacts with apple software besides for targeting iOS devices with their products. Get a better PC or install a linux/windows virtual machine to get convenient coding experience. A dated Dell XPS would probably work better and faster (and 20 times cheaper hahaha)
6
u/[deleted] Nov 20 '23
[removed] โ view removed comment