I meet a strange problem. When I build my sources into a dynamic library, everything works fine, I can get expected result, but when I instead building into a static library