PDA

View Full Version : use interesting QWT Library with QT3.X



raphaelf
23rd January 2006, 10:22
Hi everybody!

OS:WINXP
QT: 3.4
Compiler: .Net 2003

I am trying to use a very interesting Library for QT "QWT". I could run examples and use the new elements of this library in the Designer. But after compiliing my tutorial i get following error message:
Can somebody see the problem? Please see my detail steeps..


form1.obj : error LNK2019: unresolved external symbol "public: __thiscall QwtCom
pass::QwtCompass(class QWidget *,char const *)" (??0QwtCompass@@QAE@PAVQWidget@@
PBD@Z) referenced in function "public: __thiscall Form1::Form1(class QWidget *,c
har const *,bool,unsigned int)" (??0Form1@@QAE@PAVQWidget@@PBD_NI@Z)
tutorial1.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.



Detail Steeps:


Which version of qwt didi i download?
- under: http://sourceforge.net/projects/qwt
- i have download this version: qwt-4.2.0.zip


How did i configure qwt:

- cd D:\Apps\qwt
- qmake qwt.pro
- nmake
Result: i get 3 files: qwt.dll, qwt.lib, qwt.exp



How did i configure the Examples:

- cd D:\Apps\qwt\examples
- qmake examples.pro
- nmake
Result: i get for all examples a .exe file and could run it (i had to copy qwt.dll to the directory)



How did i configure the qwtplugin for the designer?

- cd D:\Apps\qwt\designer
- qmake qwtplugin.cpp
- nmake
Result: I get 4 files: qwtplugin.dll, qwtplugin.exp, qwtplugin.lib, qwtplugin.pdb


How to use qwt plugin in the designer?
- i copied qwtplugin.dll, qwtplugin.exp, qwtplugin.lib to D:\Apps\qt-3\plugins\designer
- i copied qwt.dll to D:\Apps\qt-3\bin
- i copied all includes (header files) from D:\Apps\qwt\include to D:\Apps\qt-3\include
Result: I could start qtdesigner and use the new qwt elements (sliders, buttons)



Test qwt and compiling:
- i have created a dialog with a new qwt element (a compass) and a main.cpp
- qmake
- nmake
ERROR:
form1.obj : error LNK2019: unresolved external symbol "public: __thiscall QwtCom
pass::QwtCompass(class QWidget *,char const *)" (??0QwtCompass@@QAE@PAVQWidget@@
PBD@Z) referenced in function "public: __thiscall Form1::Form1(class QWidget *,c
har const *,bool,unsigned int)" (??0Form1@@QAE@PAVQWidget@@PBD_NI@Z)
tutorial1.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

jacek
23rd January 2006, 11:56
LIBS += -lqwt ?

raphaelf
23rd January 2006, 12:24
Hi Jacek,
Of course ;)

Thanks to open my mind and solve my problem