If you use C++ threads with the GCC compiler (or perhaps more accurately, with the libstdc++ C++ standard library which ships with GCC) on Linux, you may need to include the -pthread option in your build process to get things to compile and link properly.
What I'm curious about is which library headers invoke that requirement? #include <thread> is an obvious one, but are there other standard library headers which implicitly have a pthread dependency for libstdc++?