How To Use VS CODE for C++ | With CMake & Any Compiler

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ •

  • @alperenalbayrak3380
    @alperenalbayrak3380 3 місяці тому +4

    This video helped me to obtain a general understanding of how build systems work and after two days of struggle, I'm able to compile, build and execute my multi file programs on shell with ease. Thanks.

  • @omarbgm5898
    @omarbgm5898 2 роки тому +6

    with that sound in the back and your voice i feel like getting enlightened thank you for the great video

  • @lordrevan901
    @lordrevan901 2 роки тому +10

    Thank you for this. In just 10 minutes I was able to get to the meat of writing and running C++ in VSCode.

  • @JulianAndresGuarinReyes
    @JulianAndresGuarinReyes 2 роки тому +16

    thanks Gilfoyle

  • @naserjnealhouti5289
    @naserjnealhouti5289 3 роки тому +6

    I think @8:02 you can specify the different build scripts in a task. Json file and hit shift + Ctrl +B to pick which script you want . That way you don't have to write the build script over and over.

  • @patrycja2660
    @patrycja2660 2 роки тому +25

    @8:02 "Can you turn this into a button" - there is a button already there, in your VScode version too.
    Bottom blue task bar - somewhere in the middle - there is a cog and "Build" button :P When you click it it builds whatever config you selected - which is specified on another button to the left - here "CMake: [Debug]: Ready" - when you click on it you can change between Release/MinSizeRel/RelWithDebInfo.
    But I like your video otherwise, good effort :)

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

    3:12 what did you do here? why do you suddenly habe a "build" folder? where did that come from?

  • @a2yls
    @a2yls 2 роки тому +1

    you have the most relaxing voice omf
    great video !!

  • @1ykin522
    @1ykin522 Місяць тому +1

    Why does your vs code show 4 available kit to choose! Please help me

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

    awesome video, simple and short

  • @Xenthera
    @Xenthera Рік тому +3

    Thank you Gilfoyle.

  • @siamakmirifar7422
    @siamakmirifar7422 2 роки тому +4

    Could you please make video for using C++ and VsCode in linux and how to configure tasks, launch, c_cpp_properties json fils and how to debugging application ? ☺

  • @naserjnealhouti5289
    @naserjnealhouti5289 3 роки тому +1

    Let's goooooooo!!
    Thank you so much for making this.

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

    after doind ctrl+ shit +p -> Cmake : quickstart, i can not see any option with VS Community 2019 release... options. what can be wrong here in VScode? (i have already install CMAKE, C/C++ extension in VS code)

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

    That was very helpful, thanks for explaining the launch.json file. By the way, I like your vibe

  • @williamsokol0
    @williamsokol0 2 роки тому +1

    So the MSBuild.exe was not recognized in my terminal what am I supposed to do from there, where did the command come from?
    EDIT:
    ok so I just had to add that the user's PATH environment variable:
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
    It might Enterprise/ instead of Community/ directory or something entirely different for other people.

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

    Also, you say to make the CMakeLists.txt, then you say to use the quick start (which I did not have the same options as you), and then you say if that does not work, then do things manually... What if it DID work? Do I still need the txt file??? Why are there no good tutorials for C++ and vscode?

  • @winuxworx
    @winuxworx Рік тому +6

    this method is tightly coupled to windows platform. There should be another way that doesn't use MS Visual Studio.

  • @Dev_Everything
    @Dev_Everything 2 роки тому +1

    Can you do one on how to get this working in linux?

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

    why cant we compile the Cmake List from Visual Studio Code?

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

    what about all those buttons in the blue bar at the bottom of the screen

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

    I get an error as
    _Bad CMake executable: "". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path_
    Any idea on how to solve this? Thanks in advance

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

      I had this error and solved it by installing CMake with the terminal (not just installing the CMake VSC extensions) I'm running a mac so your mileage may vary

  • @joshuamcdonald8730
    @joshuamcdonald8730 2 роки тому +1

    My build folder did not get created after running the >cmake: quickstart in the command pallette. Anyone know why?

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

      same did you figure it out

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

    man, you just saved my ass, you have no idea. thank you so much

  • @SalvatoreCosta-s1x
    @SalvatoreCosta-s1x 11 місяців тому

    Thank you, random youtube video! You saved my sanity.

  • @jeremycoleman827
    @jeremycoleman827 3 роки тому +1

    Is there a way to run a watcher and rebuild automatically, ideally with the new vs 2022 hot reloading?

  • @SamHocking
    @SamHocking 2 роки тому +2

    I wish I could get to the point of just #include working without red squiggles. On my 5th install of VS Code and following various guides installing cmake and compilers, VS Code Build Tools etc etc and it's always the same result, you can't write any code because VS Code never knows where anything is? Why is it so complex to just install and start coding in C++ I don't get it.

    • @CodeTechandTutorials
      @CodeTechandTutorials  2 роки тому

      It just needs to know where your headers are.

    • @SamHocking
      @SamHocking 2 роки тому +1

      ​@@CodeTechandTutorials I just find where the whole .h, .hh, .lib, .dll side to C++ really confusing. Any library I want to use always seems to take me hours and hours to get working and often it seems it's worked purely by luck half the time. Hopefully it gets easier, it's the main barrier for me, the coding is easy by comparison haha!

    • @CodeTechandTutorials
      @CodeTechandTutorials  2 роки тому +2

      I understand that - the problem with these ide's is they don't follow logic (as compared to coding), they just happen to be however the devs made them. I agree it is kind of annoying.

    • @SamHocking
      @SamHocking 2 роки тому

      @@CodeTechandTutorials I learned a lot from your videos, I'm getting there, so thanks. It's a steep learning curve on the workflow, but guess it's just how it is.

    • @syedsaifuddin1413
      @syedsaifuddin1413 2 роки тому

      @@SamHocking Any luck getting rid of those red squiggles??Or do you still just ignore them and work as if they don't exist?I have been looking for a fix for about 6 hours but no luck! :(

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

    Really helpful! thanks man

  • @MrFearlesskiller
    @MrFearlesskiller 2 роки тому +1

    Nvm if you see my old comments, i wasnt using the right build, i had to click "search generators" for vscode to find my vs 2022 then let me use it

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

    I don't see the .sln project file, what do I do?

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

    Whoa, that first background music is so relaxing ^^ does anyone know where to find it?

  • @bohdant.7818
    @bohdant.7818 2 роки тому +1

    How did you get build folder out of nowhere

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

      I'm also stuck on this did you find an answer?

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

    Can you do a video on using Visual Studio IDE Community with CMake & Any Compiler?

  • @samrodriguez5894
    @samrodriguez5894 2 роки тому

    Awesome video man! This helped a lot!

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

    I came for the CMake tutorial, but I stayed for the trippy music.

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

      whats the name of the music ?

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

      @@alimctavish998 reversal chungus HD

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

    I didn't get the sln file

  • @esloxford4022
    @esloxford4022 14 днів тому

    Thanks you

  • @markbaidoo7325
    @markbaidoo7325 2 роки тому

    does it works on mac

  • @theicekingkobe
    @theicekingkobe 2 роки тому

    Bad cmake executable please help

  • @ai.aspirations
    @ai.aspirations 2 роки тому

    thanks much!

  • @huseyinseberr
    @huseyinseberr 2 роки тому

    Thank you... You King

  • @tanja84dk1
    @tanja84dk1 3 роки тому

    Sorry for the late comment. Tbh I have always just used the build button in the bottom status bar to the right of where the tool chain is shown

    • @CodeTechandTutorials
      @CodeTechandTutorials  2 роки тому

      I hadn't noticed that is that from an extension?

    • @tanja84dk1
      @tanja84dk1 2 роки тому

      @@CodeTechandTutorials i believe everything in the bottom bar comes with cmake extension because you are also able to change compiler, part building etc from down there.
      EDIT: if you look at 6 minutes in the buttom of your screen below the terminal window. Those are buttons from I think the cmake extension

    • @CodeTechandTutorials
      @CodeTechandTutorials  2 роки тому

      @@tanja84dk1 I'll check it out, Thank you for the tip!

    • @adheesh2secondsago630
      @adheesh2secondsago630 2 роки тому

      @@CodeTechandTutorials yeah, cmake build tools did it all. Everything related to c++ project management in vs code. C++/C ext only provides linting and stuff.

  • @ljoikmhykh
    @ljoikmhykh 2 роки тому

    Haha Bob Ross the programmer.

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

    what a. strange workflow…

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

    Also, WTF are you opening Visual Studio for a VSCode tutorial???

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

    👍

  • @timothyhoytbsme
    @timothyhoytbsme 9 місяців тому +1

    While I appreciate your content. PLEASE SLOW DOWN! Every time you typed or did something, you left no time for viewers to pause and follow.

  • @abhi20
    @abhi20 2 роки тому +1

    Wow.. you look like Jesus talking