Hi There,

So I have something here what I try to resolve but could not so far.

I have something like:
Code:
class CLib {
...
  static SortFunc(const void *, const void *);
...
<lots of variables>
...
  static CLib *pSelf;
};

CLib::CLib {
  pSelf = this;
...
}

CLib::SortFunc(const void *p1, const void *p2) {
  if (p1 != 0) {
    pSelf->OneVariable = 1;
  }
...
}
When I compile and build the library it is fine, However when I link the library I get LNK2019 from Visual Studio (I intend to compile the same code on linux once it works). Okay, accessing non-static variable from a static function is not permitted and I just looked for a workaround. Do you have any clue how to make that work, either by eliminating the linking error or restructuring the code in order to access the non-static variables?

Thanks