Run C Program in Command Prompt
Вставка
- Опубліковано 21 січ 2017
- Learn how to compile and run C programs in the command prompt/line without using an IDE. The commands are below.
NOTE: You will need a C compiler to do this already installed, I use GCC. gcc.gnu.org/
Commands:
gcc 'name_of_the_file' e.g. gcc hello.c
gcc -o 'name_of_exe' 'name_of_file' e.g. gcc -o hello helloWorld.c
Please Subscribe !
►Become a Patreot: patreon.com/randerson112358
►Website: everythingcomputerscience.com/
►Support this channel get C-Programming Book:
www.amazon.com/gp/product/013...
Resource: ce.uml.edu/compile.htm
This was so useful, thank you👏🏻👏🏻
great video man. could understand every word you spoke, thank you, there's hope for mankind yet!
That was a quick helpful video!
Thank u so much this small video helped me to stop quiting from c programing
Thanks for watching!
Explained Very Well and I've learned it easily and simple to understand. Thanks a lot for posting such a very short and informative video... 😊😇🥰
Thank you very helpful tutorial!
Finally could run the program
Good video; Clearly explained, thanks.
TruthSearch thanks for watching!
This is the best video ever
Thank you brother
Thank you!
You have to install a gcc compiler first
I use this
sourceforge.net/projects/tdm-gcc/
It easy to download and install
I also put a link to the compiler in the description.
thanks
thank you so much bro
Help, I had a problem while compiling a files (c files), cmd always pop up when I clicked enter, and then keep pop up randomly.
So basically, I can't compile anything.
when i do gcc it says that its not a command. please help!
that likely means you don’t have the c compiler installed
thank you so much
Champion, cheers
this help me, thank a lot...
Thanks!
Thankyou! :D
Thanks brother
thank you very much really nice video
Thank you !
thanks dude.............
Thanks
thanks
thank you so much buddy love you
Thanks for watching!
vary good
Hello. First off thank you for this; I'm grateful and impressed to see programming folks explaining this for us laymen. Secondly, I just downloaded and installed GCC this afternoon so I can begin trying to do this... and I have a little hiccup I want to ask about:
I am at 1:16. I just typed as suggested and instead of it exporting a new C program, I have received an error message saying: "'Code\C'' is not recognized as an internal or external command, operable program or batch file."
For context, I have an external hard drive. My C-Drive has almost no space and is overflowing, so I have taken to installing things on my external- it's in the G drive- including the GCC packet when it prompted me, and the "Hello World" .c file I typed.
I pulled up Command Prompt; got the default line C:\Users\(myname)>; I typed G and then the folder path; and then get the error message when I try to compile the program.
---
I realize this comment's a bit disorganized, but that's exactly because I'm floundering and have only a vague idea what could be wrong. Is it because it's installed in the G Drive or is something else at play here?
Addendum: I have copied the .c file onto my desktop, employed the cd command to narrow down the folders, and the folder itself "not being recognized as a command" is no longer an issue.
However, it is now also saying that gcc is not recognized as a command. I just installed it. Any tips?
Thank u brrrrrrrrrrrro!!
why it didnt create .o file?
Hello,I have a Sourcecode with several cs files.How to do that?
' scanf() ' doesn't run in VScode(its delaying more than expected) but it ran in cmd.
Does Anyone know about this issue?
What if my c file is in some folder in a drive
how can i create a hello world program
'perl' is not recognized as an internal or external command,
operable program or batch file.
help me ! :(
same when i tape gcc :'(
you need to install minGW sourceforge.net/projects/mingw/?source=typ_redirect
should have smaller than 13 of your screen, too small to see terminal
I have a message saying that gcc is not recognized as an internal command. How to set it up?
same could you find it?
@@berkayherek1173 you need to install a compiler on your computer
I cant see it clearly
Im using TurboC, so instead of GCC what should I write?
Hhmmm... I'm not sure, I thought this was discontinued.
Try installing Dev C++ instead of TurboC, the below article can help you:
“How To Install The C-Programming Language On Windows” by randerson112358 link.medium.com/6iKKlfKcaV
Hi Silverballer48,
My suggestion is for you to download either Dev C++ or Code Blocks IDE.
A link for how to do this is below:
medium.com/@randerson112358/how-to-install-the-c-programming-language-on-windows-c9813f1c5abb
A video on how to install Dev C++ can be found below:
ua-cam.com/video/3llORi4KUmA/v-deo.html
@@ComputerSciencecompsci112358 Why would you recommend an IDE? I thought the whole point of this tutorial was to compile from the commandline - the IDE essentially does the same thing anyway so it's a bit of a useless suggestion.
The point of this video was to show how to run a program in command prompt.
To your question, why would I recommend an IDE? The simple answer is because their are benefits to using an IDE, although it depends on the language and IDE.
Some of the benefits of using an IDE is listed below:
1. Automatic code generation
2. Auto-completion when you can't remember the names
3. Warnings-as-you-type
4. Hovering over something to see the documentation
5. Integrated source control
6. Ease of running unit tests
gcc is not recognized as a command. Help!
Add it to PATH variable.
@@plasmahvhhow
Sir, I need your help
Detailed information about web design and web development in your words
Like and Subscribe My Channel
ua-cam.com/video/Ddrlvu9vks4/v-deo.html
Lectures' Language: HINDI/URDU
It has modern Computer Science Knowledge for School, College and University students.
In this lock-down, it will help you a lot. Dear Parents! teach your kids smart programming using MIT Scratch..Free course.
Help me I tried but no such file is not recognized program Iam getting this
You need to install mingw software on to your windows. From their site mingw.org
Desktop is not recognised as an internal or external command
Error.
What to do?
Did you do "cd Desktop"?
gcc not found how i can fix that?
You have to download the compiler. Seach "GCC compiler"
Sorry,I mean several c files
How is this helpful to any of you? I know the gcc commands if i get it to install on windows - you ovbiously skipped like a thousand steps. i hate seeing videos like this with comments saying " thanks so awesome!" when nothing is awesome just makes everything more irritating.
Other than installing a compiler, which I have a link to that in the description, what steps did I skip?
What do you not understand in the video?
@@ComputerSciencecompsci112358 Didn't mean to come off as rude - but correct me if I am wrong it is my understanding that you cant just install gcc its meant for linux so you have to install mingw g++ compiler on a windows machine
@@nyctimus6015 , what you don't understand in this video is something that I did not explain, which is how to install a C-compiler on Windows 10. Your question to me is "do you have to install mingw g++ compiler on windows" , the short answer is yes.
This video wasn't intended to be a "how to install GCC" video, it was simply showing commands that you can use on the command line to compile & run your C-Program source file. I am thankful of all of the positive comments on my channel, I think the internet needs more of that. If you do not understand something just ask, no need to be negative, remember these videos and a lot of other peoples content is out on the web for FREE .
I am guessing the issue is that you are having difficulty on installing the GCC compiler and mingw (Minimalist GNU for Windows). I honestly did not think it would be difficult for anyone to install the GCC compiler with so many videos, websites, & examples on the web. This may be great to make a video on, thank you for that! If you are having difficulty most likely others are as well.
If you are having trouble downloading GCC, then download Code Blocks (codeblocks-17.12mingw-setup.exe) you can find it here: www.codeblocks.org/downloads/binaries
or download DevC++, these are IDE's (Integrated Development Environments) that will automatically download everything you need.
Thanks again for the video idea, and let me know if that is the issue and if one of those two options solves your problem.
@@ComputerSciencecompsci112358 I have mingw downloaded, but gcc isn't recognized :(
I tried this n it's really work
But in my case
on my desktop the extension not shown
If somebody have idea about this please tell me