skaller wrote: > Boris, this is a very general problem in C++, coupled with > both compiler, library, and linker problems. It's all about > requirements for uniqueness. > > Here is a formula to make it all work reliably, > but first definitions: > > A *module* is either a shared library or executable > > A type is *critical* if it is shared between modules > and must be unique. > > * Do not use inline functions for critical types > -- this forces the RTTI and vtable to be in > a specific object file > > * if two libraries A,B share some critical entity X, X must > be instantiated in a third library D on which > both A and B depend: they must be linked against D > at compile time. > > If you follow these rules everything will work.
What about weak symbols? Do not they exist to solve this very problem when multiple modules export the same symbol? If a symbol is a weak symbol in all the modules, which is true for typeinfo objects, all the references to that symbol are resolved to the first one found by ld.so. Am I missing something? _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus