Joerg Frings-Fuerst
linwws.o: In function `Form1V::Form1V[in-charge](QWidget*, char const*, bool, unsigned)': /data/Entwicklung/Linux/linwws/linwws/linwws.cpp:34: undefined reference to `vtable for Form1V' /data/Entwicklung/Linux/linwws/linwws/linwws.cpp:34: undefined reference to `vtable for Form1V' collect2: ld returned 1 exit status gmake[3]: *** [linwws] Fehler 1 [...]
Vorab will ich nur anmerken, dass ich kein C++ Programmierer bin und meine C++ Kenntnisse sind daher beschränkt sind.
Also was ist "vtable for" ?
Was ein Vtable (virtual table) ist, solltest du eigentlich wissen, wenn du seit 10 Jahren C++ programmierst :) Aber vielleicht hilft dir der folgende Abschnitt aus der gcc FAQ http://gcc.gnu.org/faq.html#vtables : ---------------------------------------------------- When building C++, the linker says my constructors, destructors or virtual tables are undefined, but I defined them. The ISO C++ Standard specifies that all virtual methods of a class that are not pure-virtual must be defined, but does not require any diagnostic for violations of this rule [class.virtual]/8. Based on this assumption, GCC will only emit the implicitly defined constructors, the assignment operator, the destructor and the virtual table of a class in the translation unit that defines its first such non-inline method. Therefore, if you fail to define this particular method, the linker may complain about the lack of definitions for apparently unrelated symbols. Unfortunately, in order to improve this error message, it might be necessary to change the linker, and this can't always be done. The solution is to ensure that all virtual methods that are not pure are defined. Note that a destructor must be defined even if it is declared pure-virtual [class.dtor]/7. ----------------------------------------------- Sprich alle virtuellen Methoden müssen, soweit sie nicht 'pure virtual' sind, definiert werden. In wieweit das für deinen Code zutrifft, musst du selbst entscheiden, denn das übersteigt meine Kenntnisse. Philipp -- Philipp Thomas Arbeit: pthomas@suse.de Entwicklung, SuSE Linux AG Privat: pth@t-link.de