No video

C++ Easy Mode -- Getting Started with C++ (Using VCPKG)

  Рет қаралды 31,709

Gamefromscratch

Gamefromscratch

Күн бұрын

Пікірлер: 107
@gamefromscratch
@gamefromscratch 4 жыл бұрын
Step by Step Tutorial Link: gamefromscratch.com/vcpkg-cpp-easy-mode-step-by-step-tutorial/ Timeline: 0:01 Introduction and overview 1:07 Getting your compiler and other pieces installed 4:30 Installing VCPKG 8:08 Searching for and installing packages 11:44 Using a VCPKG in Visual Studio 15:18 Installing and configuring Visual Studio Code 18:57 Creating your Visual Studio Code based CMake project 20:30 Configuring Code to work with VCPKG 23:46 Creating your Run configuration 24:41 Compiling a Raylib project 25:50 A few more CMakeFiles.txt tweaks
@iaandrei
@iaandrei 4 жыл бұрын
Nice
@michaelxz1305
@michaelxz1305 Жыл бұрын
such a good video.. to the point
@lucasrasera1320
@lucasrasera1320 4 жыл бұрын
Oww, i spend 3 hours yesterday trying to make raylib work in VSCode, and didnt made it. Thank you!
@monolofiminimal
@monolofiminimal 4 жыл бұрын
I thoroughly enjoy seeing your recents on C:\temp
@jadrianmc3420
@jadrianmc3420 4 жыл бұрын
Lol what a coincidence for me, I was just starting to learn C++
@BosakMaw
@BosakMaw 4 жыл бұрын
same
@felixinfinita3777
@felixinfinita3777 4 жыл бұрын
The last thing you want to do when you start learning C++ is messing with libs
@franciscogerardohernandezr4788
@franciscogerardohernandezr4788 3 жыл бұрын
@@felixinfinita3777 it is the pain of C++, specially when learning to use Visual Studio options.
@silveresperanza5957
@silveresperanza5957 7 ай бұрын
I'm still quite new with C++ and have noticed that it is a boring and arduous process to manually setup libraries which made me find out about VCPKG. I've looked through numerous videos to be left confused with a lot of question and little clarification. But your video has clarified my confusion and has gotten everything to work for me. Thanks a ton!
@boredkarma708
@boredkarma708 Жыл бұрын
Even tho I know most of c++ I have never been able to install libraries since I didn't get how, you are a lifesaver sir thank you so much.
@notgate2624
@notgate2624 4 жыл бұрын
Heads up: Putting a project on GitHub with a CMake that references your own locally installed deps is not good.
@harshrathod50
@harshrathod50 4 жыл бұрын
The Visual Studio Code part is really really very helpful.
@Hoowwwww
@Hoowwwww 4 жыл бұрын
git clone --depth=1 to avoid downloading the entire git repository
@igorthelight
@igorthelight 4 жыл бұрын
+1 for that :-)
@SamirPatnaik
@SamirPatnaik 4 жыл бұрын
This is an absolute lifesaver kind sir. I tried to get it running an year ago but failed, miserably. I'm 100% sure I couldn't have figured it out with your video. Appreciation and gratitude from the bottom of my heart.
@kenmaready54
@kenmaready54 2 жыл бұрын
I've been trying to figure this out for days. This video is a lifesaver. Thank you.
@ernestomilan3628
@ernestomilan3628 3 жыл бұрын
Thanks, great tutorial. I spent about 3 days trying to do all this, and nothing. With your video I did it in 30 min
@Ryan-bn6kq
@Ryan-bn6kq 3 жыл бұрын
Omfg, thank you so much. I was trying to figure this out for hours...
@harveybates1386
@harveybates1386 4 жыл бұрын
amazing, I love c++ but the library management has always been a real problem for me. Thank you so much :)
@SixteenVoice
@SixteenVoice 4 жыл бұрын
Wow. Very powerful. Thank you Sir.
@mnajim7538
@mnajim7538 4 жыл бұрын
Holy Shit!, just to say hello world in c++, 15min tutorial is needed. DAMN!
@ahrenmorris6053
@ahrenmorris6053 4 жыл бұрын
Bahahah Love the "Recent" list at 18:04. I'm guessing there was a few cracks at this before the video got made?
@gamefromscratch
@gamefromscratch 4 жыл бұрын
My build system didn’t appreciate me uninstalling and reinstalling to make the video, that actually happens quite a lot, I get something figured out, uninstall to start from scratch for the video and some leftovers mess it up. In this case it was cmake caching
@hammer86_
@hammer86_ 4 жыл бұрын
We definitely could use a package manager for C++. Conan looks like another good one. I use MSYS2, which uses the pacman package manager. It has over 1800 packages but sadly no raylib.
@CaiLewendon
@CaiLewendon Жыл бұрын
your a saviour
@benoitrousseau4137
@benoitrousseau4137 4 жыл бұрын
Vcpkg is pretty good, just be aware that although it builds every library locally, it does not work very well for non-usual platforms. I tried to compile a simple C++ game on a Raspberry Pi for my children to play and experiment with, but I never got vcpkg to work and I ended up using the apt-get version of the bigger libs and directly including the code of the smaller libraries directly in the project. It's not a big deal and I really can't fault Microsoft for not putting engineer time on exotic platforms, but it's something to be aware of if you're going to depend on vcpkg to manage your project's libraries.
@BrainSlugs83
@BrainSlugs83 4 жыл бұрын
Yeah, if you're using Linux, there are more established (non-cross platform) options. This is more to fill the gap for Windows users I think.
@joshbishop
@joshbishop 4 жыл бұрын
Two words: HELL. YES
@user-lz2oh9zz4y
@user-lz2oh9zz4y 4 жыл бұрын
Now I can debug my Raylib code
@openroomxyz
@openroomxyz 2 жыл бұрын
That was super cool!
@edinetgrunhed6000
@edinetgrunhed6000 Жыл бұрын
finally i found what i want
@brodriguez11000
@brodriguez11000 4 жыл бұрын
Does this come with an "Easy" button? :-)
@xshawn287
@xshawn287 3 жыл бұрын
very nice tutorial!
@akshayazariah
@akshayazariah 4 жыл бұрын
Heh, could've used one of these a few years ago...
@ChonkyWantsACat
@ChonkyWantsACat 4 жыл бұрын
18:10 your frustrations are visible :p
@xinaesthetic
@xinaesthetic 4 жыл бұрын
Darshan Phaldesai I don’t think so, he’s just stressing that that’s a useful feature you’re going to want to get used to using if you work with VSCode.
@ChonkyWantsACat
@ChonkyWantsACat 4 жыл бұрын
@@xinaesthetic No no, you did not see his recent projects lol
@xinaesthetic
@xinaesthetic 4 жыл бұрын
@@ChonkyWantsACat I stand corrected. 😄
@mainframeboi3338
@mainframeboi3338 3 жыл бұрын
Thanks guy
@creativity5155
@creativity5155 4 жыл бұрын
Looks handy !
@nintandrew13
@nintandrew13 3 жыл бұрын
For visual studio, I tried installing a package (gtkmm) which depends on other packages. Vcpkg installed all of them, but when I go to compile in visual studio, it cannot locate the other package headers. Having to individually include each package seems insane (there are several dozen of them). Is there something else that needs to be done for packages that are more than a single header?
@hacker2075
@hacker2075 5 ай бұрын
Seems it wont work with static libraries.
@123goforme8
@123goforme8 4 жыл бұрын
9:43 lol, well at least it's there 😅
@broganking9830
@broganking9830 4 жыл бұрын
18:20 recent projects make it seem like you were having a bad time :D
@us07251
@us07251 3 жыл бұрын
OMG!! I miss pip install :(
@therealgunny
@therealgunny 4 жыл бұрын
composer came out in 2012 for php, they should have done this a long time ago for c++ xd
@soumyadrip
@soumyadrip 3 жыл бұрын
I followed the tutorial step by step from vs code editor, but I am having this error "LINK : fatal error LNK1104: cannot open file 'boost.lib' [C:\Users\USER\Desktop\cpp1\build\cpp1.vcxproj]", Dont understand why this thing is happening, Tried many stackoverflow threads but most of them are explaining for Visual studio IDE. Please NEED HELP.
@zahrarizkiannisa724
@zahrarizkiannisa724 3 жыл бұрын
How to fix "No suitable Visual Studio instances were found" when downloading nuget?? This problem occur when running command : .\vcpkg.exe install raylib:x64-windows
@FurtoMega
@FurtoMega 3 жыл бұрын
fucking amazing. Thank you
@aminaqadeer7570
@aminaqadeer7570 2 жыл бұрын
what to do incase of Visio code?
@Xeab
@Xeab 4 жыл бұрын
I'm actually really surprised at the amount of effort needed on windows compared to Linux
@hipihypnoctice
@hipihypnoctice 4 жыл бұрын
It's terrible. After switching to Linux life was great
@omarabdulla9628
@omarabdulla9628 4 жыл бұрын
Is it easier to work with C++ dependencies on Linux? I’m considering switching to MacOS because of the UNIX core, would that also help with C++ development?
@Xeab
@Xeab 4 жыл бұрын
Omar Abdulla, not exactly dependencies, but almost everything will be easier, for instance you don’t need to install a huge beast like visual studio just to compile c++, you just install gcc or clang, although most development on macOS requires Xcode, which is hardly any better than visual studio, on linux nothing is required, you just find the tool(s) you like with the features you want, get to making things, nothing getting in your way
@skaruts
@skaruts 4 жыл бұрын
Can you compile for windows from linux?
@Xeab
@Xeab 4 жыл бұрын
skaruts, Yes! You can use a set of tools called MinGW - Minimalist GNU for Windows, the same GNU as in gnu/linux, allowing you to use gcc to compile windows binaries from linux or windows. Its my preferred toolchain for windows since its free and open source.
@remigoldbach9608
@remigoldbach9608 4 жыл бұрын
Do you prefer VS Code or VS ? Btw nice video
@_tsu_
@_tsu_ 4 жыл бұрын
know you didn't ask but from my experience For c++ on windows, VScode is unusable so full VS it is. But VScode is decent on Linux and Mac. But there are better IDEs on those platforms. For JS/Python, VScode is arguably the best IDE for those languages.
@gamefromscratch
@gamefromscratch 4 жыл бұрын
For C++, Visual Studio, Visual Studio Code features just aren't quite there yet. For an editor or small projects, Visual Studio Code 100%
@SixteenVoice
@SixteenVoice 4 жыл бұрын
VSCode is great for training when students are using their own machines which can be Win/Linux/Mac. It is similar to Eclipse which runs a virtual environment that looks the same on all OSs. Other than that, no real need to use it that I've seen.
@jadrianmc3420
@jadrianmc3420 4 жыл бұрын
I used VS Code for Unity which is a very good substitute for Unity Monodevelop after it got taken down. It may not have too many features but there are alot plugins and stuffs for any scripting also its storage allocation is light, very light. It's designed for access efficiency and lightweight. VS Code = Good for scripting and editing, VS = Best for programming.
@2012knp
@2012knp 4 жыл бұрын
Real programmers use Vim
@yaroslavpanych2067
@yaroslavpanych2067 2 жыл бұрын
Did he ever fix that typo with scripts/buildsystems/vcpkg.cmake ? it has cmake extension for me, and it was so for years, and he used .make . Is that cause why all that wizardry with variables is required?
@TheSpacecraftX
@TheSpacecraftX 4 жыл бұрын
Does vcpkg have similar functionality as CMAKE where you can keep all your project files and build stuff separate from your source for clean source control with visual studio? So you don't need to include libraries. Or do you have to use VS Code the way you did here to make that so easy? And can you use the step-through debugger seeing as it's the Release mode compiler that VS Code seems to autodetect?
@mbilimbimbovu2970
@mbilimbimbovu2970 3 жыл бұрын
Hey sorry..how can i create a makefile that includes the library that i have downloaded from vcpkg? Please help :)
@theman3282
@theman3282 4 жыл бұрын
From the caption i was thinking c++ without all those pointer error... lol...
@gower1973
@gower1973 4 жыл бұрын
I dont see what the problem is about adding a few headers and linking libraries, its pretty much a prerequisite for beginners to do this to learn the language and how things work, I do see the benefit for experienced users to streamline their workflow, but it seems like a fair bit of hassle to setup.
@charanpreetsinghbhatia7184
@charanpreetsinghbhatia7184 3 жыл бұрын
.\bootstrap-vcpkg.bat is not creating an exe file, how can it be countered ?
@omarabdulla9628
@omarabdulla9628 4 жыл бұрын
I’m giving this a try soon when I get some free time, I hope it works and maybe then I can finally build something with C++. The dependency stuff has always driven me away from C++. Looking at Pip, npm, and nuget, the package and dependency management in C++ just seems like a complete joke.
@leocarvalho8051
@leocarvalho8051 4 жыл бұрын
on windows atleast
@SoicBR
@SoicBR 3 жыл бұрын
I love you
@nonetrix3066
@nonetrix3066 3 жыл бұрын
This is awesome but I am worried about people having to install vcpkg just to compile my code
@matanmigdal7108
@matanmigdal7108 4 жыл бұрын
this support any git hub repository ?
@Liam-pf7ih
@Liam-pf7ih 4 жыл бұрын
After watching the video I wrote how I setup c builds on windows here gist.github.com/LiamSwarbrick/96bb3236f85a81761b0b9695107f295b I find using just a batch file that calls the compiler once to be very simple. and makes adding libs like raylib easy (even though its c it shouldn't be much different to c++, change gcc to g++ etc..)
@BrainSlugs83
@BrainSlugs83 4 жыл бұрын
Like for the like god. Comment for the comment throne.
@jameshill936
@jameshill936 4 жыл бұрын
I'm glad to see the frustrated naming scheme of fuck2 and fuckthisshit when he opened VSCode
@gamefromscratch
@gamefromscratch 4 жыл бұрын
Oops. ;)
@vasiapatov4544
@vasiapatov4544 3 жыл бұрын
17:58 sickofthis fuck2 fuckthisshit He's one of us
@Mautar55
@Mautar55 4 жыл бұрын
You know... This is a good reason to replace cpp
@2012knp
@2012knp 4 жыл бұрын
YEEEEEAAAAAAAAAS, the time for Ada to shine has COME!
@BrainSlugs83
@BrainSlugs83 4 жыл бұрын
@@MiiDev69 a number of Languages claim to be direct successors, including D, and C#. IMHO, C# is almost always a better choice (especially for large projects, or where SDLC is a consideration). But I understand it's not always an option.
@perregrinne2500
@perregrinne2500 4 жыл бұрын
@@BrainSlugs83 I figured that C# might end up being my application building go-to language till I picked up Rust. Performance is much more on par with C/C++, automatic memory deallocation without any hindrance of a garbage collector, all the modern memory protections, data race prevention, the list goes on... I don't even miss C#, to be honest.
@omarabdulla9628
@omarabdulla9628 4 жыл бұрын
Michael Jensen I love C#, it’s honestly an amazing language and I’ve been using it for the last couple of months on a project I was working on, but you also have to remember that it’s a higher level language that isn’t suitable to replace a lower level language like C++. In the project I was working on we relied heavily on struct bitfields when it came to storing data and reading data. There was no native support for bitfields in C# in any capacity, and we had to do a lot of Boolean arithmetic to simulate bitfields which I’ll admit made things a little slower.
@skaruts
@skaruts 4 жыл бұрын
@Codely That's never been true except for AAA studios. And it's starting to change.
@panvrek8952
@panvrek8952 4 жыл бұрын
I miss the DJGPP days.... so much easier
@starxhilmie
@starxhilmie 4 жыл бұрын
It's says "easy" but i highly doubt it
@FleshToDust
@FleshToDust 4 жыл бұрын
This looks much more complicated than just booting up an engine and start coding.
@nextlifeonearth
@nextlifeonearth 4 жыл бұрын
Nobody ever said it wasn't. You do get much more control tho.
@MikeNugget
@MikeNugget 4 жыл бұрын
In my opinion this tutorial is not for beginners. Also the amount of excess words destroys structure of the lesson. Despite all, nice try.
@erenjeagerot
@erenjeagerot 2 жыл бұрын
I am getting the following error while running the this command: .\vcpkg.exe integrate install .\vcpkg.exe : The term '.\vcpkg' is not recognized as the name of a cmdlet, function, script file, or operable program. Che ck the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + .\vcpkg integrate install + ~~~~~~~ + CategoryInfo : ObjectNotFound: (.\vcpkg.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Getting Started with SDL2 and C++ in Visual Studio
30:59
Kyle Geske
Рет қаралды 295
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 29 МЛН
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 9 МЛН
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 10 МЛН
小丑把天使丢游泳池里#short #angel #clown
00:15
Super Beauty team
Рет қаралды 41 МЛН
Introduction to CMake Crash Course
14:08
PunchedTape
Рет қаралды 14 М.
Introduction to Conan 2 - The Best C++ Package Manager?
26:33
Coding with Mat
Рет қаралды 10 М.
I forced EVERYONE to use Linux
22:59
NetworkChuck
Рет қаралды 396 М.
So you want to make a Game Engine!? (WATCH THIS before you start)
14:39
Giant Sloth Games
Рет қаралды 292 М.
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 615 М.
The Clever Way to Count Tanks - Numberphile
16:45
Numberphile
Рет қаралды 983 М.
C++ Package Manager - A detailed introduction to Conan
46:57
Lötwig Fusel
Рет қаралды 16 М.
The cloud is over-engineered and overpriced (no music)
14:39
Tom Delalande
Рет қаралды 549 М.
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 29 МЛН