This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c++ static object initialization
- To: GCC List <gcc at gcc dot gnu dot org>
- Subject: c++ static object initialization
- From: "Joel W. Reed" <jreed at support dot ddiworld dot com>
- Date: Tue, 6 Mar 2001 21:35:56 -0500
i have two .so files each with a static object that is named
the same. this seems to confuse gcc/ld/something as one .so
file is incorrectly using the object from the other .so file.
this problem went away if i put one of the objects in one
of the .so files in its own separate namespace.
is this a known problem? am i just doing something wrong?
have i explained this well enough...
jr
ps. code in question
each .so file has a config.cpp with
config_impl config::_impl;
where config is a class
class config
{
//SNIP
private: static config_impl _impl;
};
--
------------------------------------------------------------------------
Joel W. Reed 412-257-3881
--------------All the simple programs have been written.----------------
PGP signature