编译后出现:error: collect2: ld returned 1 exit status
我以前也出现过这种错误,但把电脑重启就好了,原因好像是有程序在运行了,QT无法再编译,所以出现这个错误
但今天又出现这种错误,我重启电脑也没用了,不知道是为什么
compile output 输出的结果是(最后几行):
mingw32-make[1]: Leaving directory `F:/exercise/QT/rent/sourcefile/rent-build-desktop'
mingw32-make: Leaving directory `F:/exercise/QT/rent/sourcefile/rent-build-desktop'
debug/tabledelegate.o:F:\exercise\QT\rent\sourcefile\rent-build-desktop/../myclass/tabledelegate.cpp:42: undefined reference to `_imp___ZNK21QAbstractItemDelegate5paintEP8QPainterRK20QStyleOptionViewItemRK11QModelIndex'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\rent.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "D:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project rent (target: Desktop)
When executing build step 'Make'