Florian Weimer <fw@xxxxxxxxxxxxx> writes: > On some large application (not written by me), GCC 4.0 does not emit > some vtables, and link errors are the result. > > If I understand things correctly, a certain member is deemed the > controlling member, and the vtable is emitted in the translation unit > which contains this member. > > Is there a way to cause GCC to print this member? I think this would > help me to debug this issue. (It's probably a bug in the application, > but I'm not completely sure.) >From the documentation: C++ virtual functions are implemented in most compilers using a lookup table, known as a vtable. The vtable contains pointers to the virtual functions provided by a class, and each object of the class contains a pointer to its vtable (or vtables, in some multiple-inheritance situations). If the class declares any non-inline, non-pure virtual functions, the first one is chosen as the ``key method'' for the class, and the vtable is only emitted in the translation unit where the key method is defined. I don't know of any way to print the member. Ian