When will a global variable export to the executable? Suppose I have a a library (shared or static) with two file: lib.h and lib.cpp, in lib.h: