For example, if I static link to freeglut, does the compiler include everything from freeglut or only the parts that I use? Of course, this implies that the linker (or compi
Yes, the linker will include just the translation units that your code references.
If you generate a map file for your executable then you can see exactly what it contains.