Skip to content

Instantly share code, notes, and snippets.

Linker leaving out globals from unused object files in static libs

Starting point (using a lib.cpp symbol from main.cpp)

Look at the following code in two files:

  • main.cpp

      #include <iostream>
    

Keybase proof

I hereby claim:

  • I am tiwoc on github.
  • I am dseither (https://keybase.io/dseither) on keybase.
  • I have a public key ASCYr5gKU4ekiCvicb4kcVSKr_ZxiSUC3Qo9Vf8w6BPpuQo

To claim this, I am signing this object: