Monthly Archives: April 2009

“undefined reference to `vtable for …’ errors” in Qt derived classes

If you ever come across an error like this when compiling C++ code with Qt derived class definitions: g++ -Wl,–no-undefined -o test test.o -L/usr/lib -lQtGui -lQtCore -lpthread test.o: In function `main’: test.cpp:(.text+0x2c): undefined reference to `vtable for MyClass’ collect2: ld … Continue reading

Posted in Tricks | Tagged | 24 Comments