#How do i run a C program on Code::Blocks
111 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
@twin plinth
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
but i did
i created that program on C
using code::blocks
but i can't run it on C for some reason it doesn't show the option
i don't want my VSC to be my main code runner
@pulsar warren
what steps are you following to compile/run the code?
vsc is just a text editor, you need to have a compiler installed on your machine. Then setup build tasks which will build your program for you (and optionally run it)
if you don't have a compiler installed, I recommend following this guide https://github.com/HO-COOH/CPPDevOnWindows
yeah but like i just can't open it on Code::blocks. i want to edit my program on Code::blocks
ah well
thought it was an easy solution
thanks anyways
That's normal
You need to create a codeblocks project and add files to it
ooh
vsc and cb are different editors. They don't share the same environment file format
Follow the tutorial I sent
okay thanks
@twin plinth Has your question been resolved? If so, run !solved :)
try programming without an IDE
We're trying to help op, not demotivate her
in my experience it is 100x easier to do things in terminal and not use IDE
especially for beginners who have a 1 file program
literally all they gotta do is invoke the compiler on their program then run the output
Easier than pressing a single button? Right
I uuuuuh completly disagree
running C/C++ in say visual studio to be 1000x easier
also autocomplete, itellisense, debugging options etc
beginners should be using a debugger from moment 1
the moment they wrote hello world they should be getting introduced to it
well first of all I never used a debugger for the first 5 years of programming
cool, then you just shot yourself in the foot for 5 years
and second of all beginners when they use an IDE don't learn what's going on
completly false
I'll not deny this is true
it is true
look at the questions on here
when people use an IDE they are stupid af
false
they don't understand what's happening
it is for a beginner
a beginner can just easily learn by not using an IDE
it's easiest by far
there is absolutely nothing difficult about using a terminal
especially in a unix like environment
if we're on windows it's a different story maybe
what most student don't run ;)
windows is absolutely garbage
false
but why would I got with WSL when I can just get visual studio and have a much easier time with learning crap that actually matters
what do you mean "crap that actually matters"
learning c++
you don't need to manually compile on a commandline to understand roughly what is going on what is fine
??? you think knowing how to build a program is not part of learning the language?
all I'm saying is it's easy
literally all you gotta do is this
gcc program.c
./a.out
boom done
literally way easier than installing and setting up ide
or hey use visual studio and press play
don't understand how it's even debatable
no I'm done with this
all you ide users are trolls
it's actually ridiculous
no, I just highly disagree with your point
calling people trolls cause they disagree with you is just a bad case lol
because you're just so wrong
you can't debate this
you're leaving out all of the details
you don't just have an IDE installed and set up
that's the problem part
I mean basically
no
you don't
look at this question here
on this forum were arguing on
the person is clueless
if someone told them just open a terminal and type two commands they can easily do that
for real though, on VS hey I want to do C/C++ development box ticked, make a C++ project and done
problem solved
till, windows suddently says hey GCC isn't regonized
like I said, wsl
wsl --install
nano prog.c
type your program
gcc prog.c
./a.out
segmentation fault
repeat
oh hey I am using an IDE, it shows me exactly where the segmentation fault occurs, callstack, variable inspection and more
ohno
if only I coded via the terminal
I would be footgunning myself right now
sorry, I made a mistake. people who use the terminal never get segmentation faults
ofc, they do. but at that point you are going to be needing other tools to actually help debugging it
I can prove this wrong
what is defeating your entire point
can you not tell it is a joke
i don't care about this discussion anymore
don't ping me again
anyone
Ok
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.