Compile and run C code using Visual Studio Code (2021)

Compile and run C code using Visual Studio Code (2021)

CodeVault

4 года назад

89,363 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@knotnik
@knotnik - 24.04.2020 09:31

Too much hassle for me. I need to fight the code not the IDE. Vscode is great for python and java, but I'll stick with Dev-C++ for C.

Ответить
@scottmandel6536
@scottmandel6536 - 25.04.2020 15:54

Thank you for this video! I've only started re-learning C/C++ recently. The VS debugger, to me, is well worth the extra steps to getting this working. Question, is there a way to have multiple files in a project all compile from Visual Studio Code, and have the debugger show status for each module as it activates?

Ответить
@flamencotimes6339
@flamencotimes6339 - 26.04.2020 03:10

Hi, thanks for this interesting video. I added the extensions to vs, but it still won't compile without the gcc, so I watched your video on the C++ and now do I add that, because it's for C++ and I don't see one for C?

Ответить
@sohamdixit263
@sohamdixit263 - 10.05.2020 11:41

The task provider for "C/C++" tasks unexpectedly provided a task of type "shell". Shows me when I do ctrl+shift+B

Ответить
@alederdiablo3189
@alederdiablo3189 - 28.05.2020 01:07

Scommetto che sei italiano, bel video comunque!

Ответить
@181Ravikiran
@181Ravikiran - 11.06.2020 10:23

How to run thread application, i am having problem, header include thread is not recognised used pthread too ...

Ответить
@machinememe
@machinememe - 31.07.2020 18:07

In this video you have compiled and run c program but what if need to write c++ program ??? please reply sir i am new to vs code!

Ответить
@machinememe
@machinememe - 31.07.2020 18:12

Can we write and build C++ and C programs under same workspace

Ответить
@mavrix2356
@mavrix2356 - 29.08.2020 15:06

I too use VS Code. I like its simplicity and UI

Ответить
@johannd1100
@johannd1100 - 31.08.2020 22:15

I got a virus warning after installing this from its website :/







mingw

Ответить
@2ndborn283
@2ndborn283 - 28.10.2020 23:32

Very confusing and mismatch tutorial

Ответить
@xtal7632
@xtal7632 - 11.11.2020 07:30

This video helped me a lot. Thank you!

Ответить
@AlbertTulyakov
@AlbertTulyakov - 14.11.2020 21:56

You are great!!!

Ответить
@dahunt26
@dahunt26 - 10.12.2020 06:49

Great intro to vscode! I don't suppose you know where to get more information setting it up for arm cross compiling Linux kernel module out of tree? Thanks!

Ответить
@islamibrahim8121
@islamibrahim8121 - 24.12.2020 12:42

Hi, I'm an absolute beginner in c. I was about to delve into a 4hr course when I decided to setup vscode for c and I have down everything up to this video's Json files. I don't understand the jsons but I've noticed that vscode does everything you specified by default (I've installed code runner extension ) so I wanted to know if I'm good to go. I don't edit json files, but the build function works, and the debugger also works fine, stopping at the breakpoints. All I did was specify the same ggc run file. (excuse my misuse of terms)

Ответить
@EdwinFairchild
@EdwinFairchild - 29.12.2020 00:18

i keep getting some "only avaialbe in c99 and c11 mode" errors for some of my code, I just cant figure out to change that setting.

Ответить
@philogex
@philogex - 02.01.2021 08:41

Thanks for the tutorial, but i have a problem which i couldn't solve so far:
After properly compiling the exe (it actually works when i open it manually) i get an error message
"Starting build...
Build finished with errors(s):
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file [filename]: Permission denied
collect2.exe: error: ld returned 1 exit status"
I've excluded the mingw folder from my antivirus and there is no process of this exe already running.

Ответить
@iliaskaleridis6616
@iliaskaleridis6616 - 08.01.2021 02:38

I am tryig to do this on Windows and i don't get where I am supposed to get the output from, say, a printf. Thensimple "Hello World" programm doesn't give me an output anywhere.

Ответить
@MiguelAngel-yy5hp
@MiguelAngel-yy5hp - 09.01.2021 12:33

how do I make it so that after I build (ctrl + shift + b) it immediately opens the executable or the output? thanks

Ответить
@olekristianmller-hansen4220
@olekristianmller-hansen4220 - 13.01.2021 21:19

Hi! How did you generate "settings.json"? I am used to Code::Blocks and I believe the compile and linker settings are in this file? I am fairly new to Visual Studio Code.

Ответить
@kevinayers7144
@kevinayers7144 - 14.01.2021 23:31

c programming video on windows :(

Ответить
@brusch1553
@brusch1553 - 25.01.2021 04:58

hi man, great tutorial!
Is there a way to output the program directly into the VS Code terminal? without having to run the .exe separately after building it

Ответить
@paradox8425
@paradox8425 - 12.02.2021 12:57

thank you for this tutorial.
can someone help me about how to use opengl with pure c language in vs code?

Ответить
@NegOedipal
@NegOedipal - 05.03.2021 00:59

Thank you for the video! I wrote my code exactly like yours with an int x = 15 but when I ran it, VS Code wouldn't show anything under 'variables'. Do you have any idea why that might be?

Ответить
@beypazariofficial
@beypazariofficial - 15.04.2021 14:50

I CAN'T DO ANYTHING, JUST WASTED MY 4 HOURS ON THIS IDE OR TEXT EDITOR OR WHATEVER. IT WON'T MAKE ME BE ABLE TO RUN MY C PROGRAM. AND I CAN NOT FIND ANY SUPPORT ON THE INTERNET. RIDICULOUS. I'm AT MY LIMIT, I WON'T USE THIS PROGRAM OR WHATEVER IT CALLED IN MY ENTIRE LIFE. THANKS, MICROSOFT. I WILL KEEP USING VISUAL STUDIO 2019 NOT VS CODE

Ответить
@crisfelher9301
@crisfelher9301 - 17.04.2021 07:36

THX <3

Ответить
@eternalharmony0
@eternalharmony0 - 06.05.2021 02:00

lol it really is annoying to have to do all this just to start coding in c. python pls save mee

Ответить
@rtheben
@rtheben - 30.05.2021 01:30

thanks dude!! VERY useful

Ответить
@farhadshariat
@farhadshariat - 05.06.2021 11:58

hi tnx for tutorial I have problem with cmd i opened it from cmd but it gave me the "cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS" error what should I do ?

Ответить
@hloboy8811
@hloboy8811 - 12.06.2021 19:45

Thank you very very much🙏

Ответить
@bernardolansing
@bernardolansing - 15.06.2021 04:53

Is there a way for me to see the printf() output directly in Vscode terminal?

Ответить
@MKSundaram
@MKSundaram - 29.06.2021 15:26

How do I can add new file to a project and run?
I want separate file for functions and call it from main. How do I do? I'm using VS code.

Ответить
@vidiodirector
@vidiodirector - 27.07.2021 04:23

Hi man, If i need set up 3 tasks for c/c++ language: "run", "compile and run" and "only compile" the current file, how I must edit the tasks.json file? I send greetings from México and thanks in advance for any help.

Ответить
@vasudev287
@vasudev287 - 25.10.2021 21:34

Thanks for the video! It was helpful to get the env setup effortlessly.

Ответить
@Brink444
@Brink444 - 20.01.2022 22:37

WOW I've been stuck on a compiling error for 4 days now. This video explained everything and solved my issue! Thanks so much!!!!

Ответить
@tomerfata
@tomerfata - 28.01.2022 21:07

what shortcut do you use to run the file after building it?

Ответить
@usedicecat6780
@usedicecat6780 - 10.02.2022 10:13

hi i keep getting this error when i build my project 'cmd' is not recognized as an internal or external command,
operable program or batch file.

Ответить
@RichSchupbach
@RichSchupbach - 11.02.2022 22:07

This video was very helpful, thank you! I have a question: When I am debugging in Visual Studio Code, I do not see output of my printf statements, and I do not see a request for input in response to my scanf. Can you help me understand why this is, or direct me to a solution?

Ответить
@עומרלוי-פ3ה
@עומרלוי-פ3ה - 23.03.2022 17:36

I'm a cs student and I have the lab system programming class (with C language) where they told as to use Ubuntu but I'm trying to go with VS code lol

Ответить
@jpalvis86
@jpalvis86 - 26.03.2022 18:32

Awesome explanation!

It was really helpful as I was getting errors and I didn't know how to configure the debugger properly.


Thank you very much for this!

Ответить
@swaroopdeshpande1136
@swaroopdeshpande1136 - 08.04.2022 08:40

This might seem as an idioitic question, but do we really require MinGW to run, C on our PC?

Ответить
@y_red_gold_a4280
@y_red_gold_a4280 - 02.06.2022 03:36

You are awesome. Please keep the good work my friend.

Ответить
@АндрейБорисов-и4о
@АндрейБорисов-и4о - 01.08.2022 15:28

Thanks! Good presentation of the material!

Ответить
@manojcmmohan9426
@manojcmmohan9426 - 13.10.2022 09:55

Thankyou Sir!!!! I am really happy with this explanation

Ответить
@sevginur
@sevginur - 31.10.2022 22:48

Debugging fonction runned to my code but launch.json not created. What do you think about it?

Ответить
@edwardmacnab354
@edwardmacnab354 - 25.11.2022 13:01

1st time I ever heard of mingw. Aren't there any other compilers ?

Ответить
@tarekdarwiche8024
@tarekdarwiche8024 - 06.02.2023 02:34

I can't see the configuration gcc.exe when i go to add the configurations. help!

Ответить