PDA

View Full Version : using Qwt with windows



mesman00
10th November 2008, 18:10
Hi.
I installed Qwt 5.1.1 (i am using qt 4.3.3) for Windows with MinGW Qt4 using the instructions provided in the install text file that is shipped in the zip archive.



C) Win32/MinGW Qt4
==================

C1) Windows Shell

Start a Windows Shell, where Qt4 is initialized. ( F.e. with
"Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).

qmake qwt.pro
make

If you didn't enable autobuilding of the examples in qwtconfig.pri
you have to build the examples this way:

cd examples
qmake examples.pro
make
make install


The Qwt widgets now show up in the designer as expected. However, when i add a Qwt widget to a form, such as a qwt plot, and then try to compile it, i get an error that says


qwt_plot.h: No such file or directory

if i edit the *.pro file and add the line


INCLUDEPATH += C:\qwt-5.1.1\include

i get an error that says


C:/dev/graphing/mainwindow.cpp:5: undefined reference to `QwtPlot::QwtPlot(QWidg

note that line 5 is where i call the setupUi method. can someone help me out here? Thanks.

mesman00
10th November 2008, 18:35
i should also note that i cannot execute the qwt examples. i get the following error:


The procedure entry point _Z5qFreePv could not be located in the dynamic link library QtCore4.dll

mesman00
10th November 2008, 19:35
ok. i've fixed the problem i posted in the second post by adding c:\Qt\4.4.3\bin as the first entry in my PATH variable. I do not know what that would make a difference. however, i am still experiencing the trouble posted in the first post.

mesman00
10th November 2008, 19:50
ok i have fixed all my problems now. i had to add



INCLUDEPATH += C:\qwt-5.1.1\include
LIBS += C:\qwt-5.1.1\lib\qwt5.dll

to my project files. then since i had compiled qwt in release mode, i had to change my executable to release mode as well.

d_stranz
11th November 2008, 04:06
I have changed my Qwt compile parameters (in Visual C++) so that Debug mode builds "qwt5d.dll" and Release mode builds "qwt5.dll". This allows me to link my debug executables with a debug Qwt library and follow the debugger into Qwt if needed.

Since I convert Qt .pro files into Visual Studio projects, I don't know how to edit the .pro file directly to achieve this same output, but I'm sure it is possible.

Regards,

David

mesman00
11th November 2008, 22:25
yah i actually figured that out this morning. you can change the setting in the .pri file before compiling qwt to build both the debug and release dll's.

hamid ghous
20th June 2009, 01:45
Hi mes,

What changes you did in .pri file to run the examples of Qwt.

Cheers,