Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!chx400!ethz!neptune!c!mneerach From: mneerach@c.inf.ethz.ch (Matthias Ulrich Neeracher) Newsgroups: comp.lang.c++ Subject: Re: Re vectors and clobbering. Hashing defect? Message-ID: <53@neptune.inf.ethz.ch> Date: 16 Jul 90 13:07:39 GMT References: <6570@helios.TAMU.EDU> Sender: news@neptune.inf.ethz.ch Reply-To: mneerach@c.inf.ethz.ch (Matthias Ulrich Neeracher) Lines: 31 In article <6570@helios.TAMU.EDU> jeffw@cs.tamu.edu (Jeffrey A Waller) writes: >MY QUESTION IS: > >What is __ptbl used for anyway, and is it possible that a hashing collision >has occured to give the multiply defined symbols error. I think __ptbl's are used for multiple inheritance and virtual members. Every object belonging to a class with virtual members contains pointers to a __vtbl and a __ptbl specific to this class. Now, if somebody calls virtual member #i of this class, __ptbl[i] is added to 'this' and the member function pointed to by __vtbl[i] is called (Actually, it might also be the otherway around). Now, your multiply defined symbol error: I got this from the Apple MPW C++ manuals. C++ has to decide in which file to put the __vtbl and __ptbl of a class, which are static tables, if the class members are scattered across multiple files. Normally these tables are put into the file which contains the definition of the first non-virtual non-inline member or so. If no such member exists, the tables are put into every file that contains member definitions for this class. I don't know of any workaround. On the other hand, you can safely ignore these warnings, as all the conflicting symbols contain identical data. > -Jeff Waller > jeffw@cssun.tamu.edu Matthias *************************************************************************** * Matthias Neeracher * I wouldn't recommend sex, drugs or insanity for * * mneerach@inf.ethz.ch * everyone, but they've always worked for me - HST * ***************************************************************************