How-To Use C++ Libraries (without relying on a package manager)

  Переглядів 49,240

Code, Tech, and Tutorials

Code, Tech, and Tutorials

День тому

In this video, we talk about C++ Libraries and how to generally use them with your project. Examples are given with Visual Studio Community Edition and GLFW3. Some basic knowledge of programming is assumed.
-- Chapters --
0:00 intro
0:51 finding available C++ libs
1:48 static vs dynamic libs
3:19 C++ package manager options
5:53 starting sample visual studio proj
7:25 x86 unable to start workaround
8:16 cloning + building open source libs
17:46 including the built library
27:04 closed source libs (binary only)
27:30 going forward options
28:30 outro
-- CTT Links --
▶ / codetechtuts
▶ / discord
▶ github.com/codetechtuts
▶ codetechtuts@gmail.com [Business]
-- 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...
Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.

КОМЕНТАРІ: 71
@collapsingspace
@collapsingspace 2 роки тому
Lmao i have never seen any youtuber getting stuck in the middle of the video with an error he has no idea about, then he goes into solving it for a minute eventually gives up and moves ahead with the video and keeps all this in the final edit of the video 🤣🤣🤣🔥🔥🔥🔥👏👏
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
LOL sometimes you just got to keep it real
@Junjokar
@Junjokar 2 роки тому
I'm getting into C++ for the first since college and this definitely helped, thanks for the content!
@tuanazzam6320
@tuanazzam6320 3 роки тому
Hey, I have to say just one thing, you are awsome man. I just went through your tutorial set about cmake.. And it is clear as it should be....... Keep up the good work. Peace!!!
@tljstewart
@tljstewart 3 роки тому
This is gold man, please do a part 2!
@sedelonx5138
@sedelonx5138 11 місяців тому
You have no idea how much I struggled to find an explanation of this. LIFE SAVER
@_Mojius_
@_Mojius_ 3 роки тому
Do a part 2 gosh darn it!!! I wanna watch it
@asd99579
@asd99579 3 роки тому
Never have been so pleased with music outro.
@finalename7464
@finalename7464 3 роки тому
That was a relatively simple example. What about something more complicated? Building the Qt library or building a cross compiler toolchain. What about many additional dependencies that you may need only for building libraries and not using them? Also what about different kinds of build systems used by all those libraries and their dependencies? That's why there are people who prefer the conan or vcpkg. Package managers save time, nerves and mental energy. Do you prefer building your own LFS or using some more practical prebuilt Linux distro?
@DevLearn-lv7nr
@DevLearn-lv7nr 9 місяців тому
perfectly paced guide - thanks
@marcoorca6208
@marcoorca6208 2 роки тому
Thanks, now I understand it a bit better now!
@kb-wu7ws
@kb-wu7ws 3 роки тому
So damn confused. Feels pretty hopless trying to learn this shit on my own
@cesarcalderon2499
@cesarcalderon2499 2 роки тому
Dude its hard. Is not easy you wont learn in 1 year or day. I been studying cpp for 2 years the basic making simple shitty projects. Then after im done i have to pick a library to start on and learn it. You wont learn cpp in a year. Do 1 hour a day. Is how i do it. First years is hard while you learning the basics. Once you know what you know the rules of cpp then you move to make big projects. Keep pushing. I been for 2 and i havent done anything excited yet im almost done with the basics. Memory allocation is the hardest part so far. Just keep pushing... dont forget to live life.. 1 hour a day will do. Put a timer with 60min count down and work. Force your brain to learn it by writting code in a paper..using ide all the time is bad
@cesarcalderon2499
@cesarcalderon2499 2 роки тому
1 hour a day and live life it will change your attitudes and way of thinking
@Gogglesofkrome
@Gogglesofkrome Рік тому
An hour a day is ok, but 365 hours a year is too slow unless you're already weighed down with other responsibilities. Learning something new and valuable requires for you to make the time for it, otherwise you'll have years pass
@KamalSelvamBow
@KamalSelvamBow 3 роки тому
Hi, could you do a tutorial on adding an already existing library like (OpenCV) into your own CMakeLists. So that when you build, CMake automatically downloads the opencv from resources repository, builds it and links it with your project.
@adrianom9537
@adrianom9537 Рік тому
Hello, trying to set up xerces lib but i get stuck at the testing part, i'm on windows, do we have to set up system path to some directory to make it run on VS ? Anyway thanks for your amazing videos, it really helps understand the complexity of C++
@xuxusito
@xuxusito 3 роки тому
Thanks for this video! I really would like to see how to do this on linux with cmake.
@hugotorquato5201
@hugotorquato5201 18 днів тому
Amazing video, you make it sound easy lol. But you helped me with a problem here, thanks :)
@Feglawy
@Feglawy 11 місяців тому
Thanks a lot ❤
@jcfausto
@jcfausto Рік тому
Well explained! Thanks 👍
@CodeTechandTutorials
@CodeTechandTutorials Рік тому
Glad it was helpful!
@dobcs3236
@dobcs3236 Рік тому
Thank you very much ❣️
@thierrybeaulieu4403
@thierrybeaulieu4403 2 роки тому
Amazing!
@markbennett1237
@markbennett1237 10 місяців тому
I'm familiar with how to add header and library directories in Visual Studio, but I have been learning how to use VS Code. Does VS Code have a similar place to enter header/library directories like Visual Studio?
@DevLearn-lv7nr
@DevLearn-lv7nr 5 місяців тому
hi - the libraries you were trying to find during the video - were they pre compiled library objects or just source code libraries (that need to be compiled) ?
@GiligamerMC
@GiligamerMC 20 днів тому
One question, I've seen some people put the library path in "Additional library directories" under linker options, instead of putting them in the "Library directory" of the VC++ Directories. What difference does that make? Are they just two options for the same thing? When I try it, both methods work, but I dont know what is going on when i do that.
@mohammadkarami8984
@mohammadkarami8984 3 роки тому
thanks a lot
@bara7979
@bara7979 Рік тому
Thank you
@ajayjadhav900
@ajayjadhav900 2 роки тому
How to include sub-directories in Visual Studio? I have to include many header files, which are in different sub-directories. Is there a way in Visual Studio (I am using 2013 edition) to set one include path that Visual Studio will search also the sub-directories for header files? My Project is in C/C++. Add the "base folder" to the project (project properties -> Configuration Properties -> C/C++ -> Additional Include Directories, "additional include directories") I have tried the above option but it is not possible for me to add each and every directory followed by a semicolon. I have total 60 + different C C++ sub-directories
@martinimrich2453
@martinimrich2453 3 місяці тому
Ďakujeme.
@likwidmocean
@likwidmocean 3 роки тому
I'm prepping for an interview with aws for alexa embedded functionality built in c++. Most my experience is in c#, any architecture advice? Odd gotchas, stuff like that?
@rosshoyt2030
@rosshoyt2030 3 роки тому
Just took a course on software architectures. if that's the topic you mean, then you need to think more generally and not only about a specific language implementation. Architectures are usually developed using 4+1 view diagrams, quality attribute requirements, use cases, and more.
@rosshoyt2030
@rosshoyt2030 3 роки тому
Did a quick Google search and this paper might be relevant ( or just Google "embedded system software architecture" and select 3rd link). It discussed how to develop an embedded system architecture, so it isn't an 'example' architecture, but might shed some light on the topic. Might be useful! www.google.com/url?sa=t&source=web&rct=j&url=acs.pub.ro/~cpop/SMP/Embedded%2520book/Pages%2520from%2520Embedded%2520Systems%2520Architecture%2520-%2520A%2520Comprehensive%2520Guide%2520for%2520Engineers%2520and%2520Programmers.pdf&ved=2ahUKEwiB3I6RwPrpAhWToFsKHamHDGIQFjAMegQIAhAB&usg=AOvVaw3Q0C0WUDD1-ejqa4yxDACf
@CodeTechandTutorials
@CodeTechandTutorials 3 роки тому
It is difficult to pinpoint a single thing. C++ is notorious for having many deep, dark, rarely explored bits of (sometimes odd) functionality, so it does take a good amount of experience. My advice would be to code some projects in C++ and research anything and everything that comes up that you're not sure about. It certainly took me a while to get to were I am, and I'm still learning new stuff almost every time I code. Best of luck in the interview!
@CodeTechandTutorials
@CodeTechandTutorials 3 роки тому
Awesome to see some community action! Thanks for the link.
@zeuglcockatrice4633
@zeuglcockatrice4633 Рік тому
great video but what is that wallpaper? It's amazing and I need it
@salimp2009
@salimp2009 3 роки тому
can you make a video on how to install conan on Windows..i spent an hour but nothng on their web site worked for me; i have Python, pip and VS Studio installed and using it regularly but Somehow conan is tricky to install. for me ...it will be great if some directs like a step step by video or anythng that works for dummies :) will be great..just trying to learn. i have using learning premake and want to learn conan and cmake as well
@User_00128
@User_00128 Рік тому
Watching on a phone is really hard pls keep this in mind other than that thanks for the great content
@c3cris2
@c3cris2 Рік тому
Question: I come from python/php background, what if you don’t build the library, you just include all it’s source ? Is that possible? Why must you build the lib if you can just include all it’s source code? Sorry that’s how python/php works, and it’s confusing me. Thank you
@MagnoVJ10
@MagnoVJ10 8 місяців тому
One reason I can think of is you don't want to share the source code of third party libraries in your project, for exemple: your project is open-source but the third party libraries you're using are not.
@autodev3682
@autodev3682 Рік тому
I don't think anybody really knows C++, Maybe Mr. Stroustrup knows some of it but at one point the language took its own course and now people are just struggling in including files and libraries to the point where you need to read two or three books and watch hours of tutorials.
@xquilt
@xquilt Рік тому
0:35 It's actually npm, but close enough!
@schmidtpeter5276
@schmidtpeter5276 3 роки тому
I used to code in C++ but I switched to python (i was young, don't judge me lol) and now I'm going back to C++. Any advice or learning strategy for the second time? I feel like a totally forgot a lot of things and it's a bit confusing.
@CodeTechandTutorials
@CodeTechandTutorials 3 роки тому
Starting fresh projects always helped me. If it all goes wrong scrap it and start again. That way you get it ingrained in your mind how to the build systems work. Best of luck.
@schmidtpeter5276
@schmidtpeter5276 3 роки тому
@@CodeTechandTutorials Thanks! Btw great videos! (Gilfoyle whould be proud of you xd)
@verdrehteseele8525
@verdrehteseele8525 2 роки тому
what's wrong to code in a particular language? python in this case?
@vishnuvardhanreddy220
@vishnuvardhanreddy220 2 роки тому
17:46 : how to include library
@MFRSIAM
@MFRSIAM 2 роки тому
Please make a video on conan
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
I probably will.
@laxmanadhikari3989
@laxmanadhikari3989 2 роки тому
How can i do it on linux 😓
@yamin2000
@yamin2000 2 роки тому
10,000 views it was me
@huyvole9724
@huyvole9724 2 роки тому
What is he doing? Can anyone explain?
@tielessin
@tielessin Рік тому
This guy is soo guy, he just accidentally wrote the code for a virus in under a minute. In just 6 lines of code he put fear into the bones of one of the biggest tech companies in the world [7:20]
@davidhall7275
@davidhall7275 3 роки тому
while watching this I am waiting to learn how to use C++ libraries. Speaking of Conan and numerous other products does not show me how to use libraries. References to all these extraneous matters is a grind. You mention the difference between static and dynamic libraries as an aside--information I am seeking--and then go on to google matters which simply waste my time. Can you understand how I feel?
@CodeTechandTutorials
@CodeTechandTutorials 3 роки тому
Noted
@sanjacobs6261
@sanjacobs6261 2 роки тому
*without relying on a package manager, but still being completely reliant on Visual Studio
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
Visual Studio doesn't do much to help really. It's either that or make files or cmake or premake or just save your build commands in a script. There are just so many options for project files. None of them in particular help with the library side including visual studio unless, you use the package manager nuget or vcpkg. In reality probably should use some kind of package manager because managing libraries becomes kind of a pain after a while but it's nice to do a few manually to get an understanding of how they work. Cheers
@officialp283
@officialp283 Рік тому
Thjis is hell.
2 місяці тому
*laughs in Linux* most libs are in distro repos, glm, boost ...
@pleinclosens8304
@pleinclosens8304 2 роки тому
I remember this guy as "Our Lord , Saviour" from his CMake tutorial. Now he looks like Jesus Christ everytime I see him.
@CodeTechandTutorials
@CodeTechandTutorials 2 роки тому
Blessed be his name. Son of God. Man of code.
Сакура із свічки
00:35
Afinka
Переглядів 146 тис.
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Переглядів 16 млн
Артем Пивоваров х Klavdia Petrivna - Барабан
03:16
Artem Pivovarov
Переглядів 8 млн
Эта Мама Испортила Гендер-Пати 😂
0:40
Глеб Рандалайнен
Переглядів 8 млн
Мина разрывает живот?🤯
0:31
ОМЕГА шортс
Переглядів 2,2 млн
ОТ КОПЕЙКИ ДО МИЛЛИОНА
1:00
ANTON RIMSKIY
Переглядів 4,7 млн
БЕДНЫЙ БОБИК
0:20
МАКАРОН
Переглядів 2,5 млн