
global variable with shared library
We are trying to use a shared object (that is also our code) that has a
global variable (full class)
when using this shared object we never get to that class constructor and the
class doesn't really exist.
for example
(this is a global code in the SO file)
DemoClass A;
(in the main code that was liked to the SO file)
A.what_ever = 100;
cause's Segmentation
we are looking for maybe a switch in the ld that created the SO or the main
executable
that will tell him to use global vars in SO (this how it works on DEC for
example)
Changing this library to static makes it work with no problems.