VS Code WSL (C++) - Create Project, Compile, Run

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

ความคิดเห็น • 31

  • @pranavdesai-xv9qw
    @pranavdesai-xv9qw ปีที่แล้ว

    00:05 How to use VS Code on Windows using Windows Subsystem for Linux (WSL)
    01:20 Creating a project in VS Code using WSL
    02:31 Connect to Windows Subsystem for Linux (WSL) and open a folder in WSL
    03:48 Creating a project folder and writing a simple C++ program using VS Code WSL
    05:08 Install g++ compiler using sudo apt-get install g++ command.
    06:21 Set all warnings to errors and display them
    07:35 Building and running C++ code in VS Code with WSL
    08:45 Configuring and running C++ code in VS Code WSL

  • @x1Wolf101x
    @x1Wolf101x 11 หลายเดือนก่อน +6

    Does this still work? I've tried to go through the steps in the video but VSCode does not let me open a folder in WSL so I am stuck on that step. It also isn't letting me use commands in the terminal?

    • @theos5187
      @theos5187 4 หลายเดือนก่อน

      They deleted it from the WSL commands, but its still in the general command palette.

  • @bantering4711
    @bantering4711 3 ปีที่แล้ว

    Thanks Brian! You saved me and friend for one of our classes. We would have died if we didn't see your video

  • @MarnisAntonites
    @MarnisAntonites 8 หลายเดือนก่อน

    DR BRIAN, YOU HAVE SAVED ME, THANK YOU.

  • @unextazy
    @unextazy 2 ปีที่แล้ว

    Thank you, it helps me understand, why my code don`t compile on Ubuntu under WSL. Very concise and helpful:).

  • @KK-ib5nh
    @KK-ib5nh ปีที่แล้ว +2

    I have install the extension and done all the steps but i am not getting the green button of wsl in bottom

  • @pabloqp7929
    @pabloqp7929 2 ปีที่แล้ว

    Good vid, pretty insightful, thanks for the upload, earned my sub!

  • @aliiiccyee5736
    @aliiiccyee5736 2 ปีที่แล้ว +3

    hi, may I ask how to solve the terminal, because at terminal-> default configuration, mine doesn't prompt me the list of g++ build options, it only showed me 3 options that looked something like this: "C/C++: cl.exe build active file"
    I already have all the extensions installed

  • @jkepps
    @jkepps 2 ปีที่แล้ว +3

    Thanks for the video. I followed your instructions, however I don't have g++ on my list of compilers. Just Gulp, Grunt and Jake tasks are listed. What do I need to do to get the g++ compiler to show up? I did install WSL and g++ in Ubuntu. Thanks in advance.

    • @jkepps
      @jkepps 2 ปีที่แล้ว

      Never mind. It seems that when I installed the extensions, i must not of had the remote connection to Ubuntu at the time. When I did make a connection later, I was notified that the extensions needed to be installed in Ubuntu. Once I did that, it fixed it.

    • @nehamenon8450
      @nehamenon8450 ปีที่แล้ว +2

      @@jkepps I am facing the same issue, could you detail how you fixed it? Thanks

    • @andysyu1954
      @andysyu1954 ปีที่แล้ว

      @@nehamenon8450 To extensions download C/C++, I solved by this.

    • @user-gy1jv2tg4p
      @user-gy1jv2tg4p ปีที่แล้ว

      did you fix it?@@nehamenon8450

  • @mohamednaimi7076
    @mohamednaimi7076 2 ปีที่แล้ว +1

    Thank you! Very helpful.

  • @personxy7443
    @personxy7443 5 หลายเดือนก่อน

    sir,in wsl shell:I run "code cproject",why it just open in windows rather than in wsl?how open cproject in wsl directly?

  • @zlobert9877
    @zlobert9877 2 ปีที่แล้ว

    Only thing that is different on my system(linux mint) is that the "[1] + done" is on the same line(no spacing between) as the string i printed out. Would like to change that.

  • @rowleysghost
    @rowleysghost 28 วันที่ผ่านมา

    I'm stuck at the open folder in wsl, it talks about distro now

  • @ChandanAkbarpuria
    @ChandanAkbarpuria 2 หลายเดือนก่อน

    my wsl vs code window changes to normal vs code window when my I choose Any local folder .
    please help

  • @rufus9322
    @rufus9322 ปีที่แล้ว

    VS code: include file not found in browse. path.?

  • @Р.Т-х7р
    @Р.Т-х7р 2 ปีที่แล้ว

    Hey , good video ! I have one qustion , what operation system you maining ( Windows , linux , macos)?

  • @Igbon5
    @Igbon5 ปีที่แล้ว

    I made a directory in Windows and the rest worked out ok. Although why Run active file, under the terminal heading didn't work I suppose is another adventure in peculiarity.
    Anyhow, despite my frustration, thanks for the video, it was helpful.

  • @sudhansumtripathy
    @sudhansumtripathy 2 ปีที่แล้ว

    hi , how to remove the unwanted text form the output window, how to stop the vscode from generating an .exe file automatically,

    • @aliiiccyee5736
      @aliiiccyee5736 2 ปีที่แล้ว

      hi, for unwanted excessive txts I guess u can just type clear.

  • @billyliu6811
    @billyliu6811 6 หลายเดือนก่อน

    Make sure to do a `sudo apt install gdb` and `sudo apt-get update` if you don't have gdb installed or else vscode will complain with an error

  • @andrevshimself
    @andrevshimself 2 หลายเดือนก่อน

    Thank you !!!!!!!

  • @BoskiJanusz
    @BoskiJanusz ปีที่แล้ว

    Thank you

  • @alirazi9198
    @alirazi9198 6 หลายเดือนก่อน

    thanks

  • @AX3904P
    @AX3904P ปีที่แล้ว

    i only had to download one thing to get visual to work in Microsoft, why is this so overly complicated ? its almost like they don't want people to switch to linux...

  • @SreesaSarma
    @SreesaSarma ปีที่แล้ว

    Thank you, very helpful!!