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
@iaandrei4 жыл бұрын
Nice
@michaelxz1305 Жыл бұрын
such a good video.. to the point
@lucasrasera13204 жыл бұрын
Oww, i spend 3 hours yesterday trying to make raylib work in VSCode, and didnt made it. Thank you!
@monolofiminimal4 жыл бұрын
I thoroughly enjoy seeing your recents on C:\temp
@jadrianmc34204 жыл бұрын
Lol what a coincidence for me, I was just starting to learn C++
@BosakMaw4 жыл бұрын
same
@felixinfinita37774 жыл бұрын
The last thing you want to do when you start learning C++ is messing with libs
@franciscogerardohernandezr47883 жыл бұрын
@@felixinfinita3777 it is the pain of C++, specially when learning to use Visual Studio options.
@silveresperanza59577 ай бұрын
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 Жыл бұрын
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.
@notgate26244 жыл бұрын
Heads up: Putting a project on GitHub with a CMake that references your own locally installed deps is not good.
@harshrathod504 жыл бұрын
The Visual Studio Code part is really really very helpful.
@Hoowwwww4 жыл бұрын
git clone --depth=1 to avoid downloading the entire git repository
@igorthelight4 жыл бұрын
+1 for that :-)
@SamirPatnaik4 жыл бұрын
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.
@kenmaready542 жыл бұрын
I've been trying to figure this out for days. This video is a lifesaver. Thank you.
@ernestomilan36283 жыл бұрын
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-bn6kq3 жыл бұрын
Omfg, thank you so much. I was trying to figure this out for hours...
@harveybates13864 жыл бұрын
amazing, I love c++ but the library management has always been a real problem for me. Thank you so much :)
@SixteenVoice4 жыл бұрын
Wow. Very powerful. Thank you Sir.
@mnajim75384 жыл бұрын
Holy Shit!, just to say hello world in c++, 15min tutorial is needed. DAMN!
@ahrenmorris60534 жыл бұрын
Bahahah Love the "Recent" list at 18:04. I'm guessing there was a few cracks at this before the video got made?
@gamefromscratch4 жыл бұрын
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_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 Жыл бұрын
your a saviour
@benoitrousseau41374 жыл бұрын
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.
@BrainSlugs834 жыл бұрын
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.
@joshbishop4 жыл бұрын
Two words: HELL. YES
@user-lz2oh9zz4y4 жыл бұрын
Now I can debug my Raylib code
@openroomxyz2 жыл бұрын
That was super cool!
@edinetgrunhed6000 Жыл бұрын
finally i found what i want
@brodriguez110004 жыл бұрын
Does this come with an "Easy" button? :-)
@xshawn2873 жыл бұрын
very nice tutorial!
@akshayazariah4 жыл бұрын
Heh, could've used one of these a few years ago...
@ChonkyWantsACat4 жыл бұрын
18:10 your frustrations are visible :p
@xinaesthetic4 жыл бұрын
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.
@ChonkyWantsACat4 жыл бұрын
@@xinaesthetic No no, you did not see his recent projects lol
@xinaesthetic4 жыл бұрын
@@ChonkyWantsACat I stand corrected. 😄
@mainframeboi33383 жыл бұрын
Thanks guy
@creativity51554 жыл бұрын
Looks handy !
@nintandrew133 жыл бұрын
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?
@hacker20755 ай бұрын
Seems it wont work with static libraries.
@123goforme84 жыл бұрын
9:43 lol, well at least it's there 😅
@broganking98304 жыл бұрын
18:20 recent projects make it seem like you were having a bad time :D
@us072513 жыл бұрын
OMG!! I miss pip install :(
@therealgunny4 жыл бұрын
composer came out in 2012 for php, they should have done this a long time ago for c++ xd
@soumyadrip3 жыл бұрын
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.
@zahrarizkiannisa7243 жыл бұрын
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
@FurtoMega3 жыл бұрын
fucking amazing. Thank you
@aminaqadeer75702 жыл бұрын
what to do incase of Visio code?
@Xeab4 жыл бұрын
I'm actually really surprised at the amount of effort needed on windows compared to Linux
@hipihypnoctice4 жыл бұрын
It's terrible. After switching to Linux life was great
@omarabdulla96284 жыл бұрын
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?
@Xeab4 жыл бұрын
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
@skaruts4 жыл бұрын
Can you compile for windows from linux?
@Xeab4 жыл бұрын
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.
@remigoldbach96084 жыл бұрын
Do you prefer VS Code or VS ? Btw nice video
@_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.
@gamefromscratch4 жыл бұрын
For C++, Visual Studio, Visual Studio Code features just aren't quite there yet. For an editor or small projects, Visual Studio Code 100%
@SixteenVoice4 жыл бұрын
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.
@jadrianmc34204 жыл бұрын
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.
@2012knp4 жыл бұрын
Real programmers use Vim
@yaroslavpanych20672 жыл бұрын
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?
@TheSpacecraftX4 жыл бұрын
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?
@mbilimbimbovu29703 жыл бұрын
Hey sorry..how can i create a makefile that includes the library that i have downloaded from vcpkg? Please help :)
@theman32824 жыл бұрын
From the caption i was thinking c++ without all those pointer error... lol...
@gower19734 жыл бұрын
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.
@charanpreetsinghbhatia71843 жыл бұрын
.\bootstrap-vcpkg.bat is not creating an exe file, how can it be countered ?
@omarabdulla96284 жыл бұрын
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.
@leocarvalho80514 жыл бұрын
on windows atleast
@SoicBR3 жыл бұрын
I love you
@nonetrix30663 жыл бұрын
This is awesome but I am worried about people having to install vcpkg just to compile my code
@matanmigdal71084 жыл бұрын
this support any git hub repository ?
@Liam-pf7ih4 жыл бұрын
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..)
@BrainSlugs834 жыл бұрын
Like for the like god. Comment for the comment throne.
@jameshill9364 жыл бұрын
I'm glad to see the frustrated naming scheme of fuck2 and fuckthisshit when he opened VSCode
@gamefromscratch4 жыл бұрын
Oops. ;)
@vasiapatov45443 жыл бұрын
17:58 sickofthis fuck2 fuckthisshit He's one of us
@Mautar554 жыл бұрын
You know... This is a good reason to replace cpp
@2012knp4 жыл бұрын
YEEEEEAAAAAAAAAS, the time for Ada to shine has COME!
@BrainSlugs834 жыл бұрын
@@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.
@perregrinne25004 жыл бұрын
@@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.
@omarabdulla96284 жыл бұрын
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.
@skaruts4 жыл бұрын
@Codely That's never been true except for AAA studios. And it's starting to change.
@panvrek89524 жыл бұрын
I miss the DJGPP days.... so much easier
@starxhilmie4 жыл бұрын
It's says "easy" but i highly doubt it
@FleshToDust4 жыл бұрын
This looks much more complicated than just booting up an engine and start coding.
@nextlifeonearth4 жыл бұрын
Nobody ever said it wasn't. You do get much more control tho.
@MikeNugget4 жыл бұрын
In my opinion this tutorial is not for beginners. Also the amount of excess words destroys structure of the lesson. Despite all, nice try.
@erenjeagerot2 жыл бұрын
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