I don't understand the problem
You need to understand what static member functions are. See this tutorial for example. I also recommend the previous one about static member variables.
In short, static member functions don't know anything about instances of the class. Non-static member variables are bound to an instance of the class. Therefore non-static member variables are unavailable to static member functions.
and I don't know what to do.
What you should do depends on what your class and it's functions are supposed to do.
- If the behaviour of the function is supposed to depend on value of a member variable of an instance, then the function must be non-static and you must call it on the instance.
- If the function is supposed to only depend on global state of the class rather than an instance, then the variables the function accesses must be part of that global state (static members).
C callbacks cannot be member functions. Therefore they cannot depend on state of an instance (except a global instance, see this tutorial)