Here is the test example that causes the problem. I tried to reduce it to its strict minimum: test.cpp: #include class A { std::string mesg; }; class B : public virtual A {}; template class C : public B {}; int main() { C j; } By compiling it with g++ 3.3.1 (Mandrake 9.2): g++ -O1 -o test test.cpp Returns error: /tmp/ccwnGZD1.o(.text+0x23): In function `main': : undefined reference to `VTT for C' collect2: ld a retourné 1 code d'état d'exécution It seems that it has some problem instanciating the template class C automatically. Here are different tests that DO work (each test is independant): - replace "std::string mesg" by "int mesg" - manually instanciate template class by putting "template class C;" just before the main declaration - Move the delaration of j outside of main (global definition) - Compile with no optimisation (-O0 for example) To clarify things I tested this under: gcc 3.3.1 by Mandrake 9.2 : Failed gcc 3.3.2 by Fedora : Failed gcc 3.3.3 home compiled (with no options) : Failed gcc 3.2.2 by RedHat 9 : Work I thus suspect that this problem appeared with gcc versions 3.3 . It may also be that gcc 3.3 is more strict on the code but I have found no indication to suport this. Clement Menier. -- Summary: Instanciation problem of template class derived from virtual base class Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Clement dot Menier at inrialpes dot fr CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-px-linux-gnu GCC target triplet: i686-px-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14865