In 54 Minutes, Understand the whole C and C++ compilation process
YouTube Viewers YouTube Viewers
18.1K subscribers
37,894 views
0

 Published On Jun 2, 2021

►C++ Series Playlist:    • The C++ Programming Language  
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel:    / @mikeshah  

►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.

►YouTube Channel:    / mikeshah  
►Please like and subscribe to help the channel!
►Join our free community: https://courses.mshah.io/communities/...

show more

Share/Embed