I think using static variables across library boundaries is something one should rather avoid. (Googling should give you some material, something like initialization is not asured for example).

I would try to use static variables inside a wrapper function.

Qt Code:
  1. int &SomeClass::staticInt()
  2. {
  3. static int realInt;
  4. return realInt;
  5. }
To copy to clipboard, switch view to plain text mode 
(Or check how its done in Qt using the Q_GLOBAL_STATIC macro..which is neither documented, nor public api in the moment as far as I know)