Static variable inside shared library
c, linker, shared-libraries, static
Solution
Assuming your static variable is only defined in one translation unit, it will exist only once, as the shared library is loaded only once into the process.
This would get more difficult if a mixture of shared and static linking was used.
Problem
My question is about static variable (static void*) created inside shared library (let's call this library 'S'), but it's an internal variable not shown outside, but every call of API depends on it. Now let's think about a case, when a program (let's call it main program) links to another two shared libraries and every one of them is linked with library S. Now what happens to this static variable for our main program? Does it have one instance? Two?