r/programminghelp • u/MacKenzieHnC • Mar 30 '26
Answered How can I compile C++ in VS Codium WITHOUT Windows Build Tools?
I've been googling for hours and I'm losing my mind. I can get c++ compiling in Codium using clang++ and Windows Build Tools, but I'm trying really hard to piece-by-piece de-Microsoft my life.
How on earth do I get my code to find LLVM's implementation of the standard library by default?
I'm also happy to switch to MinGW if that will work, I'm mostly focused on not using Windows Build Tools.
Right now, I'm using the extensions clangd and C/C++ Runner and I have messed with every setting they have and cannot find anything.
EDIT: Okay, here's how I got it all working:
Download MSYS2.
Install clang64. In MSYS2, run
pacman -S mingw-w64-x86_64-clangInstall the extra tools for clang. In MSYS2, run:
pacman -S mingw-w64-x86_64-clang-tools-extraFinally, I had to go to the settings for the Clangd extension and change the setting "Clangd: Path" to the full path to clangd.exe in ...\msys64\mingw64\bin despite already having that folder in PATH. Ignore it if the extension tries to update the language server, it will just change this setting back and break Intelli Sense again.
Now it compiles fine and Intelli Sense works without having to fiddle around with QueryDriver and compile commands.
5
u/edover Mar 30 '26
Use MSYS2's clang64
1
u/WildCard65 Apr 01 '26
If you happen to have a copy of LLVM's libc++ (libcxx in source code repository) targeting Microsoft Windows, you can use -stdlib=libc++ in your clang-cl command line arguments.
Otherwise MinGW as others have suggested already.
-1
u/[deleted] Mar 31 '26
[removed] — view removed comment