static field initialization

I have really od bug and i don’t know why ;/

I have simple class like this

class Bar
{
    public:

    //Constructor here in it field = 33;
    int field;
};

class Foo
{
   public:

   static Bar bar;
};

//In CPP
Bar Foo::bar;

when i execute program on iOS value of variable field is 0 and constructor of Bar is never called so WTF? On linux it is working… on mac and running it on iOS sym is not…

Show more code please.

it is really odd…

http://stackoverflow.com/questions/17537845/ios-xcode-c-static-member-initialization

I move my code form android/linux (working here) to iOS and here it crush (not working as it should)