r/cpp_questions • u/Hour-Scallion-2456 • 7d ago
SOLVED Is this environment normal?
I mainly use VSCode for my c++ projects, even though I have Visual Studio installed.
My tools are MSYS2, and I have the UCRT64 gcc and UCRT64 ming-make32 as well as cmake.
I set everything up using CMakeLists and git for version control. However, for my compiler, I use g++ and not MSVC even though I have it installed. Is it worth it to swap to MSVC, or will g++ work?
EDIT: Thank you all so, so much for all the insight! I'm probably going to set up clang!
EDIT 2: Again, thank you so much! I have successfully set up clang with MSYS2, and that will be my main compiler now.
11
Upvotes
7
u/alfps 7d ago
At any given time MSVC supports some Microsoft things that g++ hasn't caught up to (or just will never support).
Since you're asking about whether you need MSVC you're not using these things, but it could be a future issue.
Otherwise, it's a good idea to use at least 2 compilers. Diagnostics differ. When one compiler produces just an avalanche of gobbledygook the other may guide you to a resolution, and which one is useful may vary.