Difference between revisions of "Beginner C++ Game Programming Tutorial 18"

From Chilipedia
Jump to: navigation, search
(Video Timestamp Index)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
In this video we dig down in the dirty, juicy secrets of the C++ toolchain (the preprocessor, compiler, and linker).
+
In this video we dig down in the dirty, juicy secrets of the C++ toolchain (the preprocessor, [[compiler]], and linker).
  
 
== Topics Covered ==
 
== Topics Covered ==
Line 8: Line 8:
 
* Why we have headers and #pragma once
 
* Why we have headers and #pragma once
 
* Circular #include is a bad idea
 
* Circular #include is a bad idea
 +
 +
== Notes ==
 +
 +
* In the video I say that <code>#pragma comment(lib,"something.lib")</code> is the preferred method of linking to libraries, but this is not necessarily true. <code>#pragma comment(lib ...</code> is a Microsoft extension, and other compilers might not support it. It is supported on toolchains for clang (not for the Linux linker though!), the Intel compiler, and XCode for example, but notably is not supported by gcc. Be aware that if you use this feature, you might still need to specify the library dependencies on other platforms. For a widely used alternative, take a look at CMAKE (Google that shit!).
  
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==
Line 16: Line 20:
  
 
== See also ==
 
== See also ==
 +
* [[Compiler]]
 
* [https://www.patreon.com/planetchili Planet Chili Patreon]
 
* [https://www.patreon.com/planetchili Planet Chili Patreon]
 
* [[Beginner C++ Game Programming Tutorial 19|Next in series (Tutorial 19)]]
 
* [[Beginner C++ Game Programming Tutorial 19|Next in series (Tutorial 19)]]
 
* [[Beginner C++ Game Programming Series]]
 
* [[Beginner C++ Game Programming Series]]

Latest revision as of 17:28, 26 March 2017

In this video we dig down in the dirty, juicy secrets of the C++ toolchain (the preprocessor, compiler, and linker).

Topics Covered

  • The C++ build process
  • Preprocessing and Translation Units
  • Compilation
  • Linking and Object Files
  • Why we have headers and #pragma once
  • Circular #include is a bad idea

Notes

  • In the video I say that #pragma comment(lib,"something.lib") is the preferred method of linking to libraries, but this is not necessarily true. #pragma comment(lib ... is a Microsoft extension, and other compilers might not support it. It is supported on toolchains for clang (not for the Linux linker though!), the Intel compiler, and XCode for example, but notably is not supported by gcc. Be aware that if you use this feature, you might still need to specify the library dependencies on other platforms. For a widely used alternative, take a look at CMAKE (Google that shit!).

Video Timestamp Index

Tutorial 18

Homework

There is no homework for this video. May God have mercy on our souls.

See also