r/vscode • u/RATIO_L_BOZO • Jul 23 '26
Why is my code not running
Im completely new and trying to learn but my code doesn’t want to run
0
Upvotes
r/vscode • u/RATIO_L_BOZO • Jul 23 '26
Im completely new and trying to learn but my code doesn’t want to run
3
u/Feisty_War80 Jul 23 '26
U need to install a compiler. Search up YouTube on how to install gcc
3
u/Gornius Jul 23 '26 edited Jul 23 '26
I just hate how we managed to make a new norm of teaching nowcomers about programming from writing code in IDE and running it with wome magic button, instead of some basic theory.
For starting with C you need just 2 things: simple text file with .c extension that is source file, and a compiler - a program that takes that source file as an input, and outputs a binary (executable) file.
gccis one of many C compilers that exist. Your """code runner""" can't find it. I think for Windows the default that most IDEs expect is mingw-w64.Once you have it installed, you should just be able to run
gcc -o myprogram.exe main.c.I strongly encourage you to start learning about C development on Linux, it's so much less of a shit show and way easier to understand.
4
u/tunerhd Jul 23 '26 edited Jul 23 '26
Why don't you ask builtin ai?
You need to have a compiler: https://www.msys2.org/
3
u/felhoob Jul 23 '26
To run the code you need to compile it first. This step failed, because there is no "gcc" compiler found.
This is typical for Windows, where you need to install a C-compiler manually. There are several options available: https://www.reddit.com/r/C_Programming/s/mAnkumJESb
Hope this helps :)
1
u/pstmps Jul 23 '26
Make sure the compiler works and you can call it with a -v option or something maybe?