Setup VS Code with C++ On Windows 11 (or 10)

Sdílet
Vložit
  • čas přidán 3. 04. 2023
  • In this short video, we'll install VS Code and MSYS2 to compile, run, and debug C++ programs on Windows 11. These same steps work for Windows 10 as well.
    Companion Article (free link for YT viewers :)
    medium.com/@knuggies/setup-vs...
    Reference Links:
    code.visualstudio.com/download
    www.msys2.org/
    code.visualstudio.com/docs/la...
    Join this channel to get access to perks:
    / @knuggies
    Follow on Social Media to keep up with the latest KNuggies posts:
    / knuggies3
    Join the Discord server for anouncements:
    / knuggies3
    All KNuggies Medium articles can be found here:
    / knuggies
    Looking for more programming resources? Check out Manning Publications (Affiliate Link): www.manning.com/?K...

Komentáře • 28

  • @kurdonthego
    @kurdonthego Před 8 měsíci +2

    Wow, i was stuck on this for a few days after I got a new ssd. A lot of other videos use the source forge mingw which I found didnt work but came across your's and now its working! Super short and right to the point amazing

  • @GauravSharma-ct4uc
    @GauravSharma-ct4uc Před 3 měsíci +2

    sir , you are the best , finally I was able to run c++ code in vs code . Thankyou so much sir💯💯

  • @OtakuTube636
    @OtakuTube636 Před rokem +2

    thankyou brother best video got it alright working like champ💖💝

  • @wat_abokmog1837
    @wat_abokmog1837 Před 4 měsíci +1

    Good job, thank you so much 👍🏼✌🏼

  • @kyo911
    @kyo911 Před 2 měsíci +1

    Thank you very much !

  • @alexjimenez6719
    @alexjimenez6719 Před 2 měsíci +1

    great video

  • @ml9871234
    @ml9871234 Před 5 měsíci +1

    why only take the ...-gdb package? any reason not to just take all?

  • @AF-ps1ki
    @AF-ps1ki Před 22 dny +1

    I don't know why I don't find (Environment variables). This is the second time I'm trying to install the program, but I'm having the same problem.

    • @KNuggies
      @KNuggies  Před 21 dnem

      Searching the start menu for "Environment" always brings it up for me on Windows 10 or 11.
      Right clicking the start menu and opening "System" then clicking the "Advanced system settings" link gets me there too.
      Hope this helps.

  • @abhikyadav1672
    @abhikyadav1672 Před 8 měsíci +1

    i am not getting any output in terminal but the code is compiling successfully what could be the issue ?

    • @KNuggies
      @KNuggies  Před 8 měsíci

      I've seen VS Code not display the terminal output for the first run after setting up everything because it's on another tab in the terminal area. However, this was solved for me by manually clicking the terminal tab or just running the program again. Not sure this is what you experienced.

  • @Shinn.h_
    @Shinn.h_ Před 9 měsíci +2

    What should i do if i do not have my auto complete working?

    • @KNuggies
      @KNuggies  Před 9 měsíci +1

      The main things are installing the programs and adding them to the path in windows. Double check those things first.
      Otherwise, it's such a broad problem, that starting fresh and installing again might be the way.
      Let me know how it goes.

  • @user-uy2zz7co1v
    @user-uy2zz7co1v Před 5 měsíci

    hey dude, i dont know why but i cannot see the gcc ane gdb thing in my visual code , the thing which you were doing at 3.50 min help me out here

  • @ScriptoTheCode
    @ScriptoTheCode Před měsícem +2

    I'm having an issue where isn't working are there any fixes ?

    • @KNuggies
      @KNuggies  Před měsícem +1

      Might be using iostream functions without the "std::" in front of each use or not "using namespace std;" would cause problems. If it just can't include iostream, the compiler could be missing core parts of C++ and probably needs reinstalled or some such thing. Hopefully you have it sorted out :)

    • @ScriptoTheCode
      @ScriptoTheCode Před 28 dny +1

      @@KNuggies I found a step that I did wrong so reinstalling it did end up working so thank you for the help

  • @KNuggies
    @KNuggies  Před rokem

    Free link to the medium article:
    medium.com/@knuggies/setup-vs-code-with-c-on-windows-a448a439c7b3?source=friends_link&sk=cda21d98ef318f80b9eacdaa1188dc49

  • @bemnettesfaye3716
    @bemnettesfaye3716 Před 6 měsíci +5

    it says something about jason file

    • @kawaiineko6518
      @kawaiineko6518 Před 3 měsíci

      I have the same problem

    • @treyabolicum
      @treyabolicum Před 2 měsíci

      @@kawaiineko6518 use g++ main.cpp -o main.exe instead of gcc main.cpp -o main.exe . Additionally make sure you are inside the correct directory, if not make a new folder and use gcc again. Cheers!

  • @jsx0328
    @jsx0328 Před 3 měsíci +1

    Why Msys2?

    • @KNuggies
      @KNuggies  Před 3 měsíci

      This method was based on the VS Code documentation. I also like using virtual machines, docker containers, WSL, or the original Visual Studio on Windows. There are lots of ways to run C++.

  • @logisticsmakati442
    @logisticsmakati442 Před měsícem +1

    the vscode said that my file is does not exist and needs to open json file, how to fix?

    • @KNuggies
      @KNuggies  Před měsícem

      Not sure what json file it would be trying to open...unless it is prompting you to create the "launch.json" file to save your launch configuration for each time you press F5. That is normal as it will create a "launch.json" file to store which launch mode you chose. If you have an issue with this file, you can delete it from the .vscode directory and try again.