This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problems with global variable in shared library
- To: gcc at gcc dot gnu dot org
- Subject: Problems with global variable in shared library
- From: "Bogus User" <bogus_user at hotmail dot com>
- Date: Thu, 30 Sep 1999 14:04:38 PDT
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