Difference between revisions of "Beginner C++ Game Programming Tutorial 18"
From Chilipedia
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 == | == 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!). | * 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 == | ||
+ | [https://youtu.be/pkZc4Vpemlg Tutorial 18] | ||
== Homework == | == Homework == |
Revision as of 16:19, 11 January 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
Homework
There is no homework for this video. May God have mercy on our souls.