I read about the SIOF in the faq-lite and still I really don\'t understand why the issue happens. I have a static library(.a) and I use that library to use its static const data
The static initialization order fiasco is fairly straightforward: static objects in a single translation unit are initialized in the order in which they are declared, but there is no guarantee as to the order in which static objects in different translation units are initialized with respect to each other.
So, in your specific example, foos
in main.cpp
may be initialized before foo::foofaa
, which is declared in libsource.cpp
.