jiapei100
29th June 2010, 10:30
Hi, all:
Environments:
WindowsXP
Visual Studio 2008
Qt 4.6.3
qwt-5.2.1
My program used qwt, but I always obtain the following error messages:
error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
I definitely linked the released version library qwt5.lib, and the corresponding qwt5.dll is under path.
(Note, I didn't link the debug version qwt5d.lib, by the way, how to produce the debug version under Windows? The default qwt compilation and building just produce the released version. )
Also, I noticed the post at
http://www.archivum.info/qt-interest@trolltech.com/2007-08/00243/Re:-LNK2001:-unresolved-external-symbol-quot-public:-static-struct-QMetaObject--const-QwtPlot::staticMetaObject-quot.html
It says that
It turns out the slowest way is the fast way. Problem solved!!! That is in C/C++ compiler | PreProcessor | PreProcessor Definition, which I should have, but I forget a keyword: “QWT_DLLâ€. With this keyword, the link error is gone!
However, this doesn't work for me. sad...:(
Can anybody give me a hand?
Cheers
JIA
Environments:
WindowsXP
Visual Studio 2008
Qt 4.6.3
qwt-5.2.1
My program used qwt, but I always obtain the following error messages:
error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
I definitely linked the released version library qwt5.lib, and the corresponding qwt5.dll is under path.
(Note, I didn't link the debug version qwt5d.lib, by the way, how to produce the debug version under Windows? The default qwt compilation and building just produce the released version. )
Also, I noticed the post at
http://www.archivum.info/qt-interest@trolltech.com/2007-08/00243/Re:-LNK2001:-unresolved-external-symbol-quot-public:-static-struct-QMetaObject--const-QwtPlot::staticMetaObject-quot.html
It says that
It turns out the slowest way is the fast way. Problem solved!!! That is in C/C++ compiler | PreProcessor | PreProcessor Definition, which I should have, but I forget a keyword: “QWT_DLLâ€. With this keyword, the link error is gone!
However, this doesn't work for me. sad...:(
Can anybody give me a hand?
Cheers
JIA