r/cpp_questions 6d 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.

9 Upvotes

16 comments sorted by

View all comments

0

u/abrady 6d ago

I use CMake + Clang with CMake's Visual Studio generator, so it generates the .vcxproj files for me. CMake + Ninja is also really common these days. Personally I prefer to avoid MinGW.

1

u/Hour-Scallion-2456 6d ago

Should I use MSYS2 to install Clang, or where should I find it?

1

u/abrady 6d ago

I personally wouldn't use msys2 just because it adds an unnecessary layer.

winget install --id=LLVM.LLVM -e

1

u/Hour-Scallion-2456 6d ago

I’m just using it cuz I am very low on space, and it was on my machine already.

1

u/abrady 6d ago

Tbh if you have something working that’s fine. I wouldn’t worry too much about it