Beginner C++ Game Programming Tutorial 18

From Chilipedia
Jump to: navigation, search

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