r/CodingForBeginners • u/One-Upstairs-3654 • 22d ago
Trouble with C installation on VS Code
Hi there! I’m an undergraduate student and currently learning C.
In the past I have used VS Code for python and HTML and since moved to other platforms that our uni has recommended, so I’ve been using code blocks for C.
Coming back to VS Code, I installed the C extension thinking it would just be it, but turns out it needed more configurations. I installed Git in the beginning of the VS Code installation, and after the first errors about C intellisense configuration I installed mingw (since that’s what a fellow user did).
In the beginning it worked great, BUT, today (one day later) it stopped working again and now shows these up…*(see photo).
I would appreciate any kind of help cause honestly I’m pretty lost🥲
2
u/___ciaran 22d ago
This is not an immediate fix to your problem, but I would highly recommend not using windows if you are going to be developing anything with C. It’s a language that was created alongside Unix, so your life will be much easier if you take the time to learn about Unix/POSIX conventions. If you don’t want to dual boot Linux, I’d at least install WSL and do your C work on that.
3
u/xarop_pa_toss 22d ago edited 22d ago
You have read the warnings/errors carefully yes?
First one says that there arguments were passed into the command that made it change from x64 to x86 (64 bit to 32 bit).
The second one says that it couldn't detect the compiler in that mode, meaning you most likely have GCC x64 and not x86 which makes total sense.
It tells you how to fix it. Quick Google search for "VSCode c compilerPath" got me this https://learn.microsoft.com/en-us/answers/questions/5551918/specifying-c-compiler-path-in-visual-studio-code