恩,这么说吧,用DEV C++ 我只打开一简单的 Hello world 程序,是什么问题都没有的,但是只要
class Form:public QMainWindow
{
// Q_OBJECT
public:
Form();
把 Q_OBJECT 一放出来其他都不动,马上就会在linking 的时候出现类似这样的错误:
E:\game\pintu.o(.text+0x182) In function `ZN4FormC2Ev':
[Linker error] undefined reference to `vtable for Form'
[ Linker error] undefined reference to `vtable for Form'
E:\game\pintu.o(.text+0x309c) In function `ZN4FormC1Ev':
[Linker error] undefined reference to `vtable for Form'
[Linker error] undefined reference to `vtable for Form'
E:\game\pintu.o(.text+0x309c) ld returned 1 exit status
E:\game\Makefile.win [Build Error] [Pro.exe] Error 1