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

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 82

  • @thecodebear
    @thecodebear  6 місяців тому +7

    If that didnt work try this : ua-cam.com/video/KnPj8Ow3bM8/v-deo.html

  • @bepawsitiv
    @bepawsitiv 11 місяців тому +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

  • @Name-bb8wo
    @Name-bb8wo Рік тому +55

    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

    • @Ak_lifts20
      @Ak_lifts20 11 місяців тому +2

      life saving comment

    • @Name-bb8wo
      @Name-bb8wo 11 місяців тому

      @@Ak_lifts20 Np!

    • @Koreadruid
      @Koreadruid 11 місяців тому +1

      Thanks a lot

    • @invadorop
      @invadorop 10 місяців тому +1

      Life saver❤❤❤

    • @deepaks4432
      @deepaks4432 6 місяців тому +1

      Thanks a lot man❤

  • @keanmaulana4884
    @keanmaulana4884 5 місяців тому +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.❤

  • @AHSANENGINEER-y7u
    @AHSANENGINEER-y7u 3 місяці тому

    thanku so much sir is video is slove my problem i watch multiple videos to slove my problem but this one slove is amazing u r great person sir

  • @vnzlb
    @vnzlb 11 місяців тому +11

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

  • @ismaeltezoh5824
    @ismaeltezoh5824 Рік тому +18

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

  • @alexanderliammontefalco4789
    @alexanderliammontefalco4789 9 місяців тому +10

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

  • @souljarohill8795
    @souljarohill8795 3 місяці тому

    Worked to a tee. Thank You

  • @Sidmohiteee2008
    @Sidmohiteee2008 7 місяців тому +1

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

  • @PedroFalcao-lp9lk
    @PedroFalcao-lp9lk 9 місяців тому

    Straight to the point! Ty so much

  • @luyasjohnrold7388
    @luyasjohnrold7388 5 місяців тому +2

    Thanks its working ❤

  • @_ayush_aggarwal_
    @_ayush_aggarwal_ Місяць тому

    Thankyou so much sir✨

  • @amirnafissi7393
    @amirnafissi7393 4 місяці тому

    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

  • @anllerys
    @anllerys 10 місяців тому +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.

  • @selviranin7000
    @selviranin7000 9 місяців тому

    You are a life saver! Thank you 🎉

  • @sadik_tutorials1
    @sadik_tutorials1 3 місяці тому

    TYSM!🎉🎉🎉🎉🎉🎉🎉🎉🎉

  • @meliodassama988
    @meliodassama988 10 місяців тому +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 9 місяців тому +1

      Same here did you get any help

    • @meliodassama988
      @meliodassama988 9 місяців тому

      @@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 8 місяців тому +1

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

  • @alexandreramalho9637
    @alexandreramalho9637 10 місяців тому +2

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

  • @meliodassama988
    @meliodassama988 10 місяців тому +1

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

    • @drainmysack
      @drainmysack 10 місяців тому

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

    • @jagratitripathi1861
      @jagratitripathi1861 9 місяців тому +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 5 місяців тому

      because c++ is c with oop

  • @TheCEOofSCS
    @TheCEOofSCS 11 місяців тому +2

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

  • @gssaan5871
    @gssaan5871 3 місяці тому

    Thanks ❤

  • @amazing_reels01
    @amazing_reels01 Рік тому +2

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

  • @AminAlan
    @AminAlan 6 місяців тому +1

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

  • @MainHook
    @MainHook Рік тому +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 11 місяців тому +1

      my vs code takes 6.2 second to print hello world

  • @meriemkh4382
    @meriemkh4382 6 місяців тому

    Awsome thank you so much

  • @andrewsoufia2279
    @andrewsoufia2279 4 місяці тому +1

    are these safe to download and use?

  • @lapointe3344
    @lapointe3344 5 місяців тому

    thanks for the help

  • @osamagx78
    @osamagx78 Рік тому +1

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

  • @jacktapping
    @jacktapping 8 місяців тому

    great video thanks

  • @lelouch6872
    @lelouch6872 4 місяці тому +1

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

  • @stevengaming55
    @stevengaming55 8 місяців тому +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 7 місяців тому +1

      Yo same. Idfk what to do tho

    • @ryoasuka5528
      @ryoasuka5528 7 місяців тому

      Same problem here...

    • @komaedanagito841
      @komaedanagito841 6 місяців тому +1

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

    • @ayushpawar5657
      @ayushpawar5657 5 місяців тому +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.

  • @amruthp407
    @amruthp407 7 місяців тому

    Thank you soooo much❤

  • @lancetumanan
    @lancetumanan 4 місяці тому

    can i install this on another drive of my laptop?

  • @varun.T
    @varun.T 7 місяців тому

    thank you man.

  • @davideschreiber2821
    @davideschreiber2821 9 місяців тому

    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.

  • @ごめんユウカ
    @ごめんユウカ 8 місяців тому

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

  • @អុនមនោសុមនា
    @អុនមនោសុមនា 10 днів тому

    My bin is empty why?

  • @sed-6
    @sed-6 6 місяців тому

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

    • @thecodebear
      @thecodebear  6 місяців тому

      @@sed-6 you are probably running a file with wrong extention

  • @molo-w9p
    @molo-w9p 3 місяці тому

    thanks

  • @coriesalen6966
    @coriesalen6966 11 місяців тому

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

  • @freddyboiytg2103
    @freddyboiytg2103 8 місяців тому

    The link isn't downloading for me

  • @grimhole1123
    @grimhole1123 4 місяці тому

    bash command not found

  • @mateenqureshi1417
    @mateenqureshi1417 7 місяців тому

    thankyou!

  • @homepunks9040
    @homepunks9040 11 місяців тому

    can i delete msys2 afterwards??

  • @a_tinder
    @a_tinder 6 місяців тому

    best

  • @ishankhemrajani16
    @ishankhemrajani16 Рік тому

    thanks a lot

  • @mrzaroq
    @mrzaroq Рік тому +1

    Error: failed retrieving file

    • @I.Saylor
      @I.Saylor 6 місяців тому

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

  • @xlys-
    @xlys- 4 місяці тому

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

  • @cloudbel
    @cloudbel 5 місяців тому

    i do not understand why they made it that complicated

  • @xoxo.k4te
    @xoxo.k4te 8 місяців тому

    didn't work for me :

  • @sprtywashere2077
    @sprtywashere2077 11 місяців тому +2

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

    • @kurakura05
      @kurakura05 11 місяців тому +2

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

    • @akiira9
      @akiira9 10 місяців тому +1

      i gave up and went to visual studio instead of code

  • @SpaceVultureV
    @SpaceVultureV 7 місяців тому

    Yeeeeea, that didnt work

  • @Jenniekim-bp9hw
    @Jenniekim-bp9hw 7 місяців тому

    Fake

  • @PatarapolWongpanich
    @PatarapolWongpanich 6 місяців тому

    Thank youuu