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

  Переглядів 66,439

Code, Tech, and Tutorials

Code, Tech, and Tutorials

День тому

Going over a starter template to manage your C++ project with Visual Studio Code.
-- References --
▶ code.visualstudio.com/
▶ cmake.org/
▶ docs.microsoft.com/en-us/visu...
▶ bird wallpaper in thumbnail: wallhaven.cc/w/nm3eg9
-- Code, Tech, and Tutorials Links --
▶ Patreon: / codetechtuts
▶ CTT Discord: / discord
▶ Channel Repos: github.com/codetechandtutorials
-- Other CTT Playlists You Might Like --
▶ CMake: • CMake Tutorial EP 1 | ...
▶ Beginner Cpp: • Beginner C++ Episode 0...
▶ Blender Video Editing: • How To Edit Video with...
▶ Matrix Math: • Matrix Math - Basic Co...
▶ OpenAL: • OPENAL TUTORIAL
▶ OpenGL: • OpenGL Part 1 - NEW PR...
Please let me know if any of these links are broken! Thanks!
Other ways to support me, Matt, the creator and maintainer of this channel:
▶ Follow/Sub to my Twitch Stream: / overridetheprogram
Other One Time Support Options:
▶ Use UKposts Thanks _support:
☕ www.patreon.com/codetechtuts?...
Patrons help this channel go round and keep creating. If you don't like patreon but still would like to support regularly, you can do a similar subscription via the UKposts Join, or through Github's sponsor button.
🕮github.com/codetechandtutorials
This is were I most the majority of the code seen on the channel.
✍ / discord
We have a Discord! We welcome all various code and tech chatter.
☯ / bytepro17124
I stream code and/or gaming every Thursday! I also randomly stream a time or two throughout most weeks.

КОМЕНТАРІ: 67
@lordrevan901
@lordrevan901 2 роки тому
Thank you for this. In just 10 minutes I was able to get to the meat of writing and running C++ in VSCode.
@omarbgm5898
@omarbgm5898 Рік тому
with that sound in the back and your voice i feel like getting enlightened thank you for the great video
@naserjnealhouti5289
@naserjnealhouti5289 2 роки тому
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.
@naserjnealhouti5289
@naserjnealhouti5289 2 роки тому
Let's goooooooo!! Thank you so much for making this.
@sakujin9966
@sakujin9966 Рік тому
you have the most relaxing voice omf great video !!
@JulianAndresGuarinReyes
@JulianAndresGuarinReyes 2 роки тому
thanks Gilfoyle
@xrenynthemusicmage6422
@xrenynthemusicmage6422 9 місяців тому
He really does look like Gilfoyle from Silicon Valley though
@patrycja2660
@patrycja2660 Рік тому
@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 :)
@siamakmirifar7422
@siamakmirifar7422 Рік тому
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 ? ☺
@kornskull
@kornskull Рік тому
Really helpful! thanks man
@samrodriguez5894
@samrodriguez5894 2 роки тому
Awesome video man! This helped a lot!
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
Glad it helped!
@smittywerbenjj1
@smittywerbenjj1 7 місяців тому
what about all those buttons in the blue bar at the bottom of the screen
@moxx_4712
@moxx_4712 2 місяці тому
That was very helpful, thanks for explaining the launch.json file. By the way, I like your vibe
@SIBUK
@SIBUK 8 місяців тому
I came for the CMake tutorial, but I stayed for the trippy music.
@Xenthera
@Xenthera Рік тому
Thank you Gilfoyle.
@xrenynthemusicmage6422
@xrenynthemusicmage6422 9 місяців тому
He does look strangely similar to Gilfoyle from Silicon Valley though
@huseyinseberr
@huseyinseberr 2 роки тому
Thank you... You King
@elusivepotato7922
@elusivepotato7922 2 місяці тому
man, you just saved my ass, you have no idea. thank you so much
@usualguy7583
@usualguy7583 Рік тому
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
@williamsokol0
@williamsokol0 Рік тому
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.
@SofianMW
@SofianMW 2 роки тому
thanks much!
@user-lm2sh6om3y
@user-lm2sh6om3y 3 місяці тому
Thank you, random youtube video! You saved my sanity.
@xrenynthemusicmage6422
@xrenynthemusicmage6422 9 місяців тому
Whoa, that first background music is so relaxing ^^ does anyone know where to find it?
@Dev_Everything
@Dev_Everything Рік тому
Can you do one on how to get this working in linux?
@bennguyen1313
@bennguyen1313 4 місяці тому
Can you do a video on using Visual Studio IDE Community with CMake & Any Compiler?
@jeremycoleman827
@jeremycoleman827 2 роки тому
Is there a way to run a watcher and rebuild automatically, ideally with the new vs 2022 hot reloading?
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
There is always a way.
@freakfreak786
@freakfreak786 4 місяці тому
3:12 what did you do here? why do you suddenly habe a "build" folder? where did that come from?
@timothyhoytbsme
@timothyhoytbsme Місяць тому
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?
@dominikz5776
@dominikz5776 23 дні тому
why cant we compile the Cmake List from Visual Studio Code?
@MrFearlesskiller
@MrFearlesskiller 2 роки тому
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 10 місяців тому
I don't see the .sln project file, what do I do?
@joshuamcdonald8730
@joshuamcdonald8730 Рік тому
My build folder did not get created after running the >cmake: quickstart in the command pallette. Anyone know why?
@mms7328
@mms7328 7 місяців тому
same did you figure it out
@winuxworx
@winuxworx Рік тому
this method is tightly coupled to windows platform. There should be another way that doesn't use MS Visual Studio.
@markbaidoo7325
@markbaidoo7325 Рік тому
does it works on mac
@tanja84dk1
@tanja84dk1 2 роки тому
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.
@fufloradar
@fufloradar Рік тому
Haha Bob Ross the programmer.
@theicekingkobe
@theicekingkobe Рік тому
Bad cmake executable please help
@neeladke9557
@neeladke9557 3 місяці тому
I didn't get the sln file
@bohdant.7818
@bohdant.7818 Рік тому
How did you get build folder out of nowhere
@mms7328
@mms7328 7 місяців тому
I'm also stuck on this did you find an answer?
@SamHocking
@SamHocking Рік тому
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 Рік тому
It just needs to know where your headers are.
@SamHocking
@SamHocking Рік тому
​@@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 Рік тому
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 Рік тому
@@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 Рік тому
@@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! :(
@guilherme5094
@guilherme5094 11 місяців тому
👍
@arnolduk123
@arnolduk123 Рік тому
not much help if you forget to mention that you need a c++ compiler.
@altrrrr
@altrrrr 2 місяці тому
0:30
@arnolduk123
@arnolduk123 2 місяці тому
@@altrrrr Fair enough I missed that part. Still he did say that so quickly and skipped the hardest step and that's the Gigabyte of compielr downloads, setting up your compiler, cmake and paths. This is not as trival as saying, 'uh, you need a C++ compiler'
@arnolduk123
@arnolduk123 2 місяці тому
If you have Visual Studio why would you need to use VSCode to compile your C++ code ??
@timothyhoytbsme
@timothyhoytbsme Місяць тому
Also, WTF are you opening Visual Studio for a VSCode tutorial???
@robertjonka1238
@robertjonka1238 Рік тому
what a. strange workflow…
@abhi20
@abhi20 2 роки тому
Wow.. you look like Jesus talking
@UltraNyan
@UltraNyan Рік тому
tech jesus
@timothyhoytbsme
@timothyhoytbsme Місяць тому
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.
CMake Tutorial EP 1 | Understanding The Basics
15:37
Code, Tech, and Tutorials
Переглядів 409 тис.
How-To Use C++ Libraries (without relying on a package manager)
30:22
Code, Tech, and Tutorials
Переглядів 48 тис.
Військовослужбовці ЗСУ проводять оповіщення в Полтаві
00:32
2024 C++ and CMake Setup in Visual Studio Code: A Step-by-Step Guide
35:00
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Переглядів 57 тис.
Code faster with these VS Code shortcuts
8:44
Coder Coder
Переглядів 271 тис.
CMake основы
12:46
S0ER
Переглядів 45 тис.
BEST WAY to make Desktop Applications in C++
26:00
The Cherno
Переглядів 859 тис.
Modern CMake for C++
11:38
Smok Code
Переглядів 34 тис.
Основы CMake // Демо-занятие курса «Специализация C++ Developer»
1:17:47
OTUS Онлайн - образование
Переглядів 2,9 тис.
Folders & files in VS Code made super fast like this!
0:29
Visual Studio Code
Переглядів 606 тис.
31 nooby C++ habits you need to ditch
16:18
mCoding
Переглядів 694 тис.
300 000 за🚀МОЩНЫЙ, Но МЕРТВЫЙ ноут из Китая. Ремонт cyberpowerpc tracer 7 EDGE. Нюансы китай ноутов.
46:12
ААНТ КОНТАКТ Сервис по ремонту техники в ЕКБ, СПБ
Переглядів 60 тис.
Распаковка айфона в воде😱 #shorts
0:25
НЭКС
Переглядів 677 тис.