C++ libraries and what inline has to do with them

  Рет қаралды 3,815

Code for yourself

Code for yourself

Күн бұрын

Пікірлер: 25
@CodeForYourself
@CodeForYourself 2 жыл бұрын
This lecture goes slightly in-depth in places. Don't worry! You won't have to do any of this manually! We will be using some build system like CMake or bazel for this. But to understand how those work it helps immensely to know what happens under the hood. 😜 Are you sold on this notion?
@reubenthomas1033
@reubenthomas1033 2 жыл бұрын
Yes absolutely!! I’ve never understood what Cmake is actually doing. I often get stuck during build errors. I would love to understand what actually goes on under the hood
@ilarioantonioazzollini66
@ilarioantonioazzollini66 2 жыл бұрын
I completely agree, thanks for the lecture! It would be very helpful imo if you could do an entire lecture dedicated to CMake and more in general on how to structure a project (probably there is no general way then some different examples of architectures would be required). Do you plan on doing something like that?
@CodeForYourself
@CodeForYourself 2 жыл бұрын
Yep, that's the plan for the next (or one after that) video 😉
@ilarioantonioazzollini66
@ilarioantonioazzollini66 2 жыл бұрын
@@CodeForYourself Awesome, thank you again!
@jonathans3021
@jonathans3021 Жыл бұрын
This lecture cleared up a lot of confusions I had about libraries, thank you!
@CodeForYourself
@CodeForYourself Жыл бұрын
Glad to hear that!
@ramcharanthota1016
@ramcharanthota1016 2 жыл бұрын
great lecture.Finally, I understadn ODR and inline really well
@CodeForYourself
@CodeForYourself 2 жыл бұрын
Glad to hear it! 🙏
@gabrielalmeidasantosdeoliv1870
@gabrielalmeidasantosdeoliv1870 2 жыл бұрын
Excelent lecture, can see it took a lot of work too do.
@CodeForYourself
@CodeForYourself 2 жыл бұрын
Yeah, I tried my best to be concise but still explain most of the stuff I wanted to explain. It's still not perfect, but I can always come back to it in the future and make it better 😉
@ChrisOffner
@ChrisOffner 2 жыл бұрын
Another great lecture, thank you! :)
@joy7673
@joy7673 2 жыл бұрын
Hi, waiting for the following lectures.
@CodeForYourself
@CodeForYourself 2 жыл бұрын
They're coming but probably towards 15th of November or so. I'm out for a conference and it's hard to squeeze everything together.
@marwanzaghloul6065
@marwanzaghloul6065 2 жыл бұрын
@@CodeForYourself take your time its going to be amazing lecture as usual , i cant wait 😅
@muhammedkocaer8373
@muhammedkocaer8373 7 күн бұрын
I wanna ask you about #pragma. Do they not prevent multiple definitions of the same header? If it is, why it didn't prevent when linking? I know libfoo and libbar are different libraries so we have multiple copies. But when linking with the main code, why we couldnt rerun #pragma 😄? Why #pragma doesnt make inline's job also. I couldnt understand this.
@CodeForYourself
@CodeForYourself 7 күн бұрын
@@muhammedkocaer8373 thanks for the question! These are all confusing things. Let’s try to break them down. The pragma once is a preprocessor directive that can be seen by a # in front of it. This means that the compiler never sees it. Instead the preprocessor replaces it with some unique guard for this file so that when this file is included twice, it actually only gets included once. The include is also a preprocessor directive, so the compiler does not see it either. Instead, the preprocessor just textually replaces an include with the content of the underlying file. But only once because of the pragma once. Does this somewhat answer your question?
@muhammedkocaer8373
@muhammedkocaer8373 6 күн бұрын
​@@CodeForYourself Now I get it. I asked this question as if it were performing a function task. But I forgot that it was a preprocessor. Thanks.
@CodeForYourself
@CodeForYourself 6 күн бұрын
@@muhammedkocaer8373 awesome! Glad I could help!
@ChimiChanga1337
@ChimiChanga1337 6 ай бұрын
What if we make header-only libraries instead.
@CodeForYourself
@CodeForYourself 6 ай бұрын
You mean like not ever use any other libraries?
@ChimiChanga1337
@ChimiChanga1337 6 ай бұрын
​@@CodeForYourself okay I'm too much of a beginner. I think I understand the tradeoffs of different types of libraries. Header only libs makes the devs life simple. But if you want to hide the implementation then they wont work.
@CodeForYourself
@CodeForYourself 6 ай бұрын
@@ChimiChanga1337 yes, you are exactly right! Also, header only libraries, when we have many of them, make compilation waaay too slow. With compiler libraries we are able to often compile them once and link all over the place. Does this make sense?
@ChimiChanga1337
@ChimiChanga1337 6 ай бұрын
@@CodeForYourself Yes, I understand now. I really want to thank you again for this course!
@CodeForYourself
@CodeForYourself 6 ай бұрын
@@ChimiChanga1337 my pleasure and I'm really happy that you like it! 🙏
🏗️ Build your libraries easier using build systems
8:02
Code for yourself
Рет қаралды 1,6 М.
BETTER Header Files and Preprocessor Debugging
24:26
The Cherno
Рет қаралды 74 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,2 МЛН
Муж внезапно вернулся домой @Oscar_elteacher
00:43
История одного вокалиста
Рет қаралды 8 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 37 МЛН
why do header files even exist?
10:53
Low Level
Рет қаралды 434 М.
Const correctness in C++
10:02
Code for yourself
Рет қаралды 3,4 М.
Starting Out With Python Part 10
25:17
Code Talker Looter
Рет қаралды 28
Re-inventing move semantics in modern C++ in 13 minutes
13:20
Code for yourself
Рет қаралды 7 М.
Precompiled Headers | Game Engine series
10:22
The Cherno
Рет қаралды 68 М.
References in C++ Explained
14:21
Caleb Curry
Рет қаралды 103 М.
Compiling C programs with Multiple Files
6:09
Jacob Sorber
Рет қаралды 87 М.
15 Years Writing C++ - Advice for new programmers
4:04
SyncMain
Рет қаралды 1,3 МЛН
Headers and libraries, but with classes
7:07
Code for yourself
Рет қаралды 1,7 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,2 МЛН