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

  Рет қаралды 52,002

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.

Пікірлер: 74
@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
@bayroot7385
@bayroot7385 10 күн бұрын
Oh my god, finally a video that actually helps. Thank you so much!
@sedelonx5138
@sedelonx5138 Жыл бұрын
You have no idea how much I struggled to find an explanation of this. LIFE SAVER
@Junjokar
@Junjokar 2 жыл бұрын
I'm getting into C++ for the first since college and this definitely helped, thanks for the content!
@asd99579
@asd99579 3 жыл бұрын
Never have been so pleased with music outro.
@_Mojius_
@_Mojius_ 3 жыл бұрын
Do a part 2 gosh darn it!!! I wanna watch it
@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!
@DevLearn-lv7nr
@DevLearn-lv7nr 11 ай бұрын
perfectly paced guide - thanks
@alexmattyou
@alexmattyou 25 күн бұрын
Wow, I can understand the power of Github. I never know this before. I usually download the source and built it. Great tutorial thanks.
@martinimrich2453
@martinimrich2453 5 ай бұрын
Ďakujeme.
@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
@hugotorquato5201
@hugotorquato5201 2 ай бұрын
Amazing video, you make it sound easy lol. But you helped me with a problem here, thanks :)
@thierrybeaulieu4403
@thierrybeaulieu4403 2 жыл бұрын
Amazing!
@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.
@dobcs3236
@dobcs3236 Жыл бұрын
Thank you very much ❣️
@jcfausto
@jcfausto Жыл бұрын
Well explained! Thanks 👍
@CodeTechandTutorials
@CodeTechandTutorials Жыл бұрын
Glad it was helpful!
@Feglawy
@Feglawy Жыл бұрын
Thanks a lot ❤
@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?
@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++
@bara7979
@bara7979 Жыл бұрын
Thank you
@mohammadkarami8984
@mohammadkarami8984 3 жыл бұрын
thanks a lot
@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
@GiligamerMC
@GiligamerMC 2 ай бұрын
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.
@DevLearn-lv7nr
@DevLearn-lv7nr 6 ай бұрын
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) ?
@markbennett1237
@markbennett1237 11 ай бұрын
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?
@xuxusito
@xuxusito 3 жыл бұрын
Thanks for this video! I really would like to see how to do this on linux with cmake.
@likwidmocean
@likwidmocean 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
Awesome to see some community action! Thanks for the link.
@User_00128
@User_00128 Жыл бұрын
Watching on a phone is really hard pls keep this in mind other than that thanks for the great content
@micahwright7760
@micahwright7760 Ай бұрын
I tried using this method for curl but it didn't work. Could you make a video tutorial for this specific case?
@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 9 ай бұрын
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.
@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
@schmidtpeter5276
@schmidtpeter5276 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
@@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?
@kqvanity
@kqvanity Жыл бұрын
0:35 It's actually npm, but close enough!
@vishnuvardhanreddy220
@vishnuvardhanreddy220 3 жыл бұрын
17:46 : how to include library
@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]
@laxmanadhikari3989
@laxmanadhikari3989 2 жыл бұрын
How can i do it on linux 😓
@yamin2000
@yamin2000 2 жыл бұрын
10,000 views it was me
@MFRSIAM
@MFRSIAM 2 жыл бұрын
Please make a video on conan
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
I probably will.
@huyvole9724
@huyvole9724 2 жыл бұрын
What is he doing? Can anyone explain?
@officialp283
@officialp283 Жыл бұрын
Thjis is hell.
@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
@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.
4 ай бұрын
*laughs in Linux* most libs are in distro repos, glm, boost ...
Introduction to Conan 2 - The Best C++ Package Manager?
26:33
Coding with Mat
Рет қаралды 8 М.
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,4 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 13 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 20 МЛН
How To Use VS CODE for C++ | With CMake & Any Compiler
9:14
Code, Tech, and Tutorials
Рет қаралды 71 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 285 М.
STM32 Guide #2: Registers + HAL (Blink example)
30:02
Mitch Davis
Рет қаралды 185 М.
Write Better Code!  |  How to Create Shared Libraries in C/C++
13:59
Low Level Learning
Рет қаралды 51 М.
Programming a multiplayer game from scratch in 7 DAYS
18:28
Networking in C++
32:50
The Cherno
Рет қаралды 232 М.
Modern CMake for C++
11:38
Smok Code
Рет қаралды 39 М.
C++ Libraries For Beginners
6:12
Michael Forest
Рет қаралды 137 М.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 562 М.
Man tries outrunning cops on skateboard
0:10
Frankie Lapenna
Рет қаралды 10 МЛН
Арестовали наглых мошенников 🤯
0:52
Фильмы I Сериалы
Рет қаралды 4,7 МЛН
😨 24 ЧАСА чтобы найти школьную ПИЦЦУ
0:41
Настя, это где?
Рет қаралды 4,1 МЛН