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]

c++ static object initialization


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


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