Beginner C++ Game Programming Tutorial 18
In this video we dig down in the dirty, juicy secrets of the C++ toolchain (the preprocessor, compiler, and linker).
- The C++ build process
- Preprocessing and Translation Units
- Linking and Object Files
- Why we have headers and #pragma once
- Circular #include is a bad idea
- 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
There is no homework for this video. May God have mercy on our souls.