This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems with global variable in shared library


Hi,

I have a global variable that is an instance of a class that has members 
that use STL types, in this case a map.  If I put the variable in a shared 
library and then try to link against it, the map doesn't get initialized and 
it seg faults when I try to use it.  This doesn't happen if I create a 
static library instead of a shared library.

I don't know if this is a bug or not.  I have a very simple program, with 
GNU makefiles, that demonstrate the problem.  If someone can look at it and 
see either what I'm doing wrong or how I can fix it, it would be much 
appreciated.

Thanks,
Rich

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]