In 54 Minutes, Understand the whole C and C++ compilation process

preview_player
Показать описание

►Lesson Description: I've seen enough folks struggle with compiling in C and C++ that it is time for a full video to understand the process. As a result of understanding the compilation process, you can understand why a project should be split into smaller components, and how that makes your code faster to compile, easier to debug, and dare I say...more fun to work with!

0:00 Introduction
0:35 High Level Overview of Compilation
6:17 Simple Project Setup
10:10 Compiling
12:09 Preprocessor output
13:29 All functions are extern
14:02 Syntax error versus linking error
15:33 successful compile of multiple sources
17:02 Redefinition errors
18:30 Header Guards
20:20 Compiler at a high level
22:57 g++ syntax tree visualization
24:53 Assembly Overview and Output
28:24 Outputting object file (.o)
30:00 Compiling Files Individually
31:10 Linking o files together
32:05 objdump
34:22 Dynamically linked libraries
35:30 ldd dynamially linked shared libraries
36:35 Summary and Recap
39:36 Practical Example with SFML Library
40:45 Compiling without linking libraries error
41:54 Linking in the correct libraries
43:16 Using the -L flag to find library
44:42 PATH and environment variables for default search paths
45:58 Include Path
50:00 Fixing Include Path Errors
51:07 What your IDE is hiding from you.

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

boy i wish i had seen this video when I was an undergrad

yanfranca
Автор

That was the best lecture about compilers on the whole internet. Thanks Mike!

lucassilveira
Автор

Its amazing to figure out how many layers of abstraction we are living upon. not to mention python or javascript like langauges which are much higher level than c++.

husenpatel
Автор

I still watch these even after graduating 😅 thank you for the hard work!

kjollyman
Автор

This is a really great video!!! I hope that I could see it when I started learning programming....
This contains everything you need to learn for compiling process....
It would have spared lots of wasted time.

min-yenlu
Автор

Impeccable explanation. I wish my college had professors like you who would explain the nitty gritty details and not just go through presentation slides.

saberlite
Автор

Thank you! Great video and explanation.

olegwizex
Автор

What a great video! It was great to find such a cohesive video about the compiling process, thank you for creating this!

oscarmvl
Автор

This video gives quite a practical overview. Tools like ldd and those flags are really most frequently used in any meaningful projects. Only those who really use C/C++ can summarize it in such a concise but practical way!

zikangxiong
Автор

Bro this channel is soo damn underrated-- you should have like billion views on this video and billion subscribers

hsociety
Автор

Thank you for this video! It helped me understand a lot of concepts that I missed or that weren't even included in my lectures in the first place. I have my bachelor's exam in a little over a week, so I am currently trying to fill the gaps in my knowledge and you definitely helped me with that! :D

sabrinagschwendtner
Автор

This is special and deserves more views and likes. Well explained.

jovannyswicktutorials
Автор

Thank you so much for this video. It really helped me put together every piece of information I have gathered along the way so far, and already gave me ideas on how to solve the (pretty sophisticated) linking issues I am currently facing. Incredible video ❤

DocteurZeuhl
Автор

This is awesome. Im doing a masters in a.i. next year and we will be having to use a lot of different languages throughout the course, i thought learning c/c++ would be advantageous as my first language. Thanks you very much for this!

dontbemadsunshine
Автор

Nice Video!!! So many things make sense now. I tried to include SDL in my C++ project on windows some days ago. Sould have watched this video before. would have saved me a lot of trouble.

nikolasyo
Автор

Thank you, sir !! The content was very good.

tamajitbanerjee
Автор

great explanation! Nice to see a Linux command-line approach, since now I just saw Visual Studio

lln
Автор

This video has been incredibly helpful to me. Thank you for sharing.

I've been a subscriber to your channel for some time now. I stumbled upon it while researching Design Patterns (which I'm still trying to master), but this video greatly assisted me in completing a questionnaire for my Computer Science Coursea at UFRJ

I genuinely appreciate your content and aspire to become a professional like you in the future.

willianpessoa
Автор

Very detailed, thanks for creating this video :)

DCKUR
Автор

Superb video. Super useful. Many Thanks for sharing your knowledge. Easy sub.
As an old fart hobbyist, currently getting back into C++, I'm amazed how few C++ resources, be they books or online courses, cover this build stuff in any detail. It seems most of them want you installing Visual Studio etc on day one, then there's a bit of magic hand waving, assuring you that the IDE will take care of all these things, and I'm sure it will, but I do like to know what my tools are doing for me. Then I try to install raylib and I become painfully aware that I don't have a clue about building from the command line.
Again, Many Thanks for sharing your knowledge. I really like your teaching style. I noticed you have series on C++ itself, and also SDL2. I have a feeling I may end up using SDL2 instead of raylib. :-)

samdavepollard