就是这个:: error: collect2: ld returned 1 exit status,我主要是刚接触,编译器输出的信息看不太懂。
tmp/obj/debug_shared/moc_mainwindow.o:moc_mainwindow.cpp:(.rdata$_ZTV10MainWindow[vtable for MainWindow]+0xf4): undefined reference to `non-virtual thunk to MainWindow::~MainWindow()'
tmp/obj/debug_shared/moc_mainwindow.o:moc_mainwindow.cpp:(.rdata$_ZTV10MainWindow[vtable for MainWindow]+0xf8): undefined reference to `non-virtual thunk to MainWindow::~MainWindow()'
collect2: ld returned 1 exit status
mingw32-make[1]: Leaving directory `C:/Qt/2010.04/qt/untitled2-build-desktop'
mingw32-make: Leaving directory `C:/Qt/2010.04/qt/untitled2-build-desktop'
mingw32-make[1]: *** [debug\untitled2.exe] Error 1
mingw32-make: *** [debug-all] Error 2
The process "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project untitled2 (target: Desktop)
When executing build step 'Make'
我用的win7
------解决方案--------------------
第一种方法。试着把调试(因为你是以debug模式编译的)下的exe文件和moc文件删除,然后重新生成。
第二种方法。把程序关了再开。然后rebuild...
我只碰到过ld returned 1 exit status 这种问题,但描述和你的描述不一样。。只是建议。。。
------解决方案--------------------
http://blog.csdn.net/lbsljn/archive/2009/12/13/4994844.aspx