title: c++ library with c interface
body: <p>i need to write a library in c++ , usable by client to do some operations in a remote server. The only thing in the specific i haven't done yet it's: The c++ library need a C interface. Let me explain better:
  From client using this lib i need to do call something like:
  int operation(void* addr);
  if int&lt;0 error
  and so..
  But the library it's a class in c++.
  So my answer is.. Need I a global variable holding the instance of class in the library?
  The are some better option to develop this C interface of C++ class?</p>
  
  <p>Thx in advice for answer. </p>