[Qt-interest] Linker Error I do not understand
Matthias Pospiech
matthias.pospiech at gmx.de
Mon Jun 21 22:32:59 CEST 2010
Hi,
I have a project which fails at a single class in linking. I get these
errors:
mainwindow.obj:-1: error: unresolved external symbol
"__declspec(dllimport) public: __thiscall
QCameraWidget::QCameraWidget(class QWidget *)"
(__imp_??0QCameraWidget@@QAE at PAVQWidget@@@Z) referenced in function
"public: void __thiscall Ui_MainWindowClass::setupUi(class QMainWindow
*)" (?setupUi at Ui_MainWindowClass@@QAEXPAVQMainWindow@@@Z)
mainwindow.obj:-1: error: unresolved external symbol "protected:
virtual void __thiscall QCameraWidget::paintEvent(class QPaintEvent *)"
(?paintEvent at QCameraWidget@@MAEXPAVQPaintEvent@@@Z)
and such, for all methods of the QCameraWidget class, all failting to
link in mainwindow.obj
However I load the header in the cpp file, as well in the ui_* file.
#include "QCameraWidget.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindowClass)
, camera(new QuEyeCamera)
{
...
the Class is build in a dll, which is linked with
debug:LIBS += -L../lib/$${COMPILER}/debug/ -l$${LIBRARY_NAME}
in the pro file. All other classed do not fail, so I expect that the
library .lib file is loaded actually.
So now I do not know what to check else. Any ideas?
Matthias
More information about the Qt-interest-old
mailing list