How to Set up Visual Studio Code for C and C++ Programming [ with MSYS2 ]

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024
  • In this video ill show you how to setup visual studio code for c/c++ programming on windows , we will first download and Install C/C++ toolset mingw using the msys2 which is a c/c++ compiler and then we will download and install code runner extention in vscode.
    Updated version : • How to Set up Visual S...

Комментарии • 79

  • @thecodebear
    @thecodebear  3 месяца назад +5

    If that didnt work try this : ruclips.net/video/KnPj8Ow3bM8/видео.html

  • @Name-bb8wo
    @Name-bb8wo 9 месяцев назад +53

    guys anyone had a problem with entering y. just click enter before it to accept and then you can write y and it will download everything

  • @bepawsitiv
    @bepawsitiv 8 месяцев назад +5

    really helpfull video, after following each step one by one my c++ setup is completed in vs code. thankyou for making such informative video

  • @keanmaulana4884
    @keanmaulana4884 2 месяца назад +3

    Hello mister, I am very proud of your tutor. I am a student studying informatics and I was given an assignment to code C++. It's been a week and I've been getting errors.❤

  • @ismaeltezoh5824
    @ismaeltezoh5824 9 месяцев назад +18

    This is something I have tried several times but I still can't do it

  • @alexanderliammontefalco4789
    @alexanderliammontefalco4789 5 месяцев назад +8

    I am having an error when I run it . The error is "g++: error: Downloads\programcodes\programTEST: No such file or directory
    "

  • @vnzlb
    @vnzlb 7 месяцев назад +11

    Glad it worked for you guys, mine is not...

  • @anllerys
    @anllerys 7 месяцев назад +3

    I follow everystep one by one and whem finished the helloWorld last 5 to 10 seconds to run, any advice. I try in visual estudio 2022 and happen the same.

  • @meliodassama988
    @meliodassama988 7 месяцев назад +8

    Really need help, my visual code says "cannot build and debug because the active file is not a c or c++ source"
    I made a .c and a .cpp file, both don't work

    • @jagratitripathi1861
      @jagratitripathi1861 6 месяцев назад +1

      Same here did you get any help

    • @meliodassama988
      @meliodassama988 6 месяцев назад

      @@jagratitripathi1861 i forgot how but i download some extensions from microsoft for running, compiling, and debugging, as well as some color coded lines lol.
      I managed to use it when i save the file and THEN build it

    • @agamer2943
      @agamer2943 5 месяцев назад +1

      try to remove space from "a .c" to make it "a.c"

  • @Sidmohiteee2008
    @Sidmohiteee2008 4 месяца назад +1

    Ya that was the exact probleem i faced thanks sir for making me overcome over it

  • @AminAlan
    @AminAlan 3 месяца назад +1

    Is it possible to upgrade to updated C and C++ versions of MSYS?

  • @meliodassama988
    @meliodassama988 7 месяцев назад +1

    just wanted to clarify, why is microsoft c/c++ has only c++? what extension is for c only?
    newbie here

    • @drainmysack
      @drainmysack 6 месяцев назад

      c and c++ are the same, c++ just uses classes and objects where c does not

    • @jagratitripathi1861
      @jagratitripathi1861 6 месяцев назад +1

      Because c is a subset of c++ so we will be able to access features of both languages with c++

    • @abc-qk3ml
      @abc-qk3ml 2 месяца назад

      because c++ is c with oop

  • @souljarohill8795
    @souljarohill8795 17 дней назад

    Worked to a tee. Thank You

  • @StormCloudStudios189
    @StormCloudStudios189 8 месяцев назад +2

    The "Edit Environment Variable" window aren't the same as that one when I clicked on "Path."

  • @andrewsoufia2279
    @andrewsoufia2279 Месяц назад +1

    are these safe to download and use?

  • @osamagx78
    @osamagx78 8 месяцев назад +1

    does it work for those who sve their code in a usb flash drive ?

  • @MainHook
    @MainHook 9 месяцев назад +1

    Hi! I'm sorry for using this space asking you this, but my Hello World took 10+ seconds to compile and run. Awkward, right? Already reinstall the MSYS2, use the g++ instead of the gcc on c_cpp_properties.json but nothing worked. Maybe if I could compile and run the same Hello World program on another IDE, to see if this is a VScode problem, but idk how to do it. Can you help me, pls? Thank you!

    • @bepawsitiv
      @bepawsitiv 8 месяцев назад +1

      my vs code takes 6.2 second to print hello world

  • @amazing_reels01
    @amazing_reels01 10 месяцев назад +2

    bro after inputing y command it is showing same thing ....i.e Enter a selection (default=all): what to do ?

  • @lancetumanan
    @lancetumanan Месяц назад

    can i install this on another drive of my laptop?

  • @alexandreramalho9637
    @alexandreramalho9637 7 месяцев назад +2

    can't belive I wasted my time seeing the last year guide... oh god, thanks

  • @PedroFalcao-lp9lk
    @PedroFalcao-lp9lk 6 месяцев назад

    Straight to the point! Ty so much

  • @davideschreiber2821
    @davideschreiber2821 6 месяцев назад

    Completed everything as described, but get error message when I try to run a program. So frustrating. I think I'll abandon C with curses and stick with Python.

  • @amirnafissi7393
    @amirnafissi7393 24 дня назад

    If it doesn't work once you ran vs code, make sure you added the correct path to your system environment variables. The default should be C:\msys64\ucrt64\bin

  • @selviranin7000
    @selviranin7000 6 месяцев назад

    You are a life saver! Thank you 🎉

  • @stevengaming55
    @stevengaming55 4 месяца назад +2

    i now get the error
    "the prelaunch task 'C/C++:gcc.exe build active file' terminated with exit code -1."
    what to do ?

    • @SpaceVultureV
      @SpaceVultureV 4 месяца назад +1

      Yo same. Idfk what to do tho

    • @ryoasuka5528
      @ryoasuka5528 4 месяца назад

      Same problem here...

    • @komaedanagito841
      @komaedanagito841 3 месяца назад +1

      Select use g++, not gcc, when you're debugging

    • @ayushpawar5657
      @ayushpawar5657 Месяц назад +1

      I assume you have selected something else while selecting for run and debug, search for tasks.json file, then delete everything inside outermost parenthesis, now save the file, this deletes all the saved settings,
      Now you can again click on run button in your active window, when asked for a selection select C/C++: g++.exe option. Now it will work as expected.

  • @freddyboiytg2103
    @freddyboiytg2103 4 месяца назад

    The link isn't downloading for me

  • @luyasjohnrold7388
    @luyasjohnrold7388 Месяц назад +2

    Thanks its working ❤

  • @zenovcozru6153
    @zenovcozru6153 3 месяца назад

    anyone know how to fix Launch:program "Path" Does not exist error?

    • @thecodebear
      @thecodebear  3 месяца назад

      @@zenovcozru6153 you are probably running a file with wrong extention

  • @grimhole1123
    @grimhole1123 Месяц назад

    bash command not found

  • @sadik_tutorials1
    @sadik_tutorials1 9 дней назад

    TYSM!🎉🎉🎉🎉🎉🎉🎉🎉🎉

  • @coriesalen6966
    @coriesalen6966 8 месяцев назад

    no. 6 step it's not working when I put y..it's invalid 😥i can't proceed to the next step😥😥

  • @riderofriders7342
    @riderofriders7342 5 месяцев назад

    But off topic but, anyone knows the VS Code theme he's using? 3:34

  • @lelouch6872
    @lelouch6872 Месяц назад +1

    Thnx a lot.......it was so annoying ❤

  • @gssaan5871
    @gssaan5871 12 дней назад

    Thanks ❤

  • @lapointe3344
    @lapointe3344 Месяц назад

    thanks for the help

  • @homepunks9040
    @homepunks9040 7 месяцев назад

    can i delete msys2 afterwards??

  • @meriemkh4382
    @meriemkh4382 3 месяца назад

    Awsome thank you so much

  • @cloudbel
    @cloudbel 2 месяца назад

    i do not understand why they made it that complicated

  • @mohamedlotfy9189
    @mohamedlotfy9189 4 часа назад

    thanks

  • @mrzaroq
    @mrzaroq 9 месяцев назад +1

    Error: failed retrieving file

    • @I.Saylor
      @I.Saylor 3 месяца назад

      Did it work? For you? I have the same problem

  • @amruthp407
    @amruthp407 4 месяца назад

    Thank you soooo much❤

  • @jacktapping
    @jacktapping 5 месяцев назад

    great video thanks

  • @varun.T
    @varun.T 3 месяца назад

    thank you man.

  • @xoxo.k4te
    @xoxo.k4te 4 месяца назад

    didn't work for me :

  • @PatarapolWongpanich
    @PatarapolWongpanich 3 месяца назад

    Thank youuu

  • @xlys-
    @xlys- 27 дней назад

    the terminal looks ugly but at least its finally working i was bout to kms

  • @a_tinder
    @a_tinder 3 месяца назад

    best

  • @ishankhemrajani16
    @ishankhemrajani16 9 месяцев назад

    thanks a lot

  • @sprtywashere2077
    @sprtywashere2077 8 месяцев назад +2

    it keeps showing a fucking annoying ass G++ error its annoying as hell.

    • @kurakura05
      @kurakura05 8 месяцев назад +2

      hey same me too
      did you find out any solution for this?

    • @akiira9
      @akiira9 7 месяцев назад +1

      i gave up and went to visual studio instead of code

  • @SpaceVultureV
    @SpaceVultureV 4 месяца назад

    Yeeeeea, that didnt work

  • @Jenniekim-bp9hw
    @Jenniekim-bp9hw 4 месяца назад

    Fake

  • @mateenqureshi1417
    @mateenqureshi1417 4 месяца назад

    thankyou!