How to Run C in VS Code on MacOS

preview_player
Показать описание
I will show you how to run C in Visual Studio Code (#vscode) on MacOS (both M1 and Intel will work). Running a C program in Visual Studio Code is simple once you have the required tools installed. We will install both the C/C++ extension as well as the Code Runner extension in VS Code.

Timestamps:
0:00 - Introduction
0:32 - How to install C/C++ extension in visual studio code
1:01 - How to install Code Runner extension in visual studio code
1:19 - Install C compiler (clang)
3:00 - Creating a C program
3:12 - Running a C program in visual studio code

Found this video helpful and want to buy me a coffee?
Рекомендации по теме
Комментарии
Автор

Thank You Man! I've been wasting 2 days on trying to follow 1st C lecture of CS50 Harvard course, but i couldn't even run C on my mac. 10 minutes thanks to you and it works

ShazzoAPM
Автор

thank you, for the simple and excellent video, not like all others that take 20 minutes to do simple stuff

kaiposaldanha
Автор

does of you who is getting an error, it's because you assume your file is saved before running. save your file and then press run.

you can also change the settings to "Save All Files Before Run" in Code-runner setting.

ThasinAkhand
Автор

Thanks boss. Just started learning C and glad to get this out of the way. Very clear and helpful.

archermidland
Автор

Thank you so much! Your tutorial is straightforward and works like a charm.

vegetaiv
Автор

i got the following error while running the program in my macos(m2)

Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

dhatshayani
Автор

even i do these things, i cant see my codes output on output place, i see in in debug console, how can i solve this issue?

selin
Автор

help me sir, I have problem when running the code, it says (Error exists after running preLaunchTask 'C/C++: clang++ build active file'.) and if I continue it says error like this (launch: program does not exist) what should I do? thank you

afifhusain
Автор

Did this exactly and got error "clang: error: linker command failed with exit code 1 (use -v to see invocation)"

jonathanmontrose
Автор

how to solve this


Undefined symbols for architecture x86_64:
"_main", referenced from:
<initial-undefines>
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

[Done] exited with code=1 in 0.286 seconds

wtf-nmdl
Автор

It would be nice to add a video on installing gcc on the Mac and configure VSCode to use the GCC compiler. Yes, I know, CLANG is good, but there are good reasons to use GCC otherwise.

davecomer
Автор

Gracias. Información valiosa y explicación de calidad. Me ha servido ya que codeblocks no puedo ejecutarlo en mi mac m2.

undefinedkey
Автор

Very easy to follow, and it worked. Thanks!

jestaman
Автор

Infuriating me always sends this error : Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Youcanatme
Автор

there`s no option to run code, only run c/c++ and debug c/c++, both of which don`t work

rohansgowda
Автор

how do I run it in the terminal instead of output?

mxxr_d
Автор

Please anyone help me how i can build the code before the run 😭😭😭
I have a problem in this point and i can’t understand it 😭😭😭😭

hebaaltomi
Автор

im having problem on my terminal "zsh: permission denied: /Users/" please help

guy_with_gt_
Автор

It wont show me anything in the output

majorcracked
Автор

sorry i don't know how to input data in this configuration

jialinbu