Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Hi,
I had been sucessfully using qwt-5.1.1 with Qt 4.3.3 and MinGW under Windows XP. I recently uninstalled Qt 4.3.3 and MinGW, deleted the directory containing qwt-5.1.1 and then installed the new Qt Software development kit, which includes Qt 4.5.0 and MinGW. Following that I reinstalled qwt-5.1.1, including the examples.
In running the qwt example programs, approximately half of them raise a Windows error, which is displayed in a dialog box. The dialog says, e.g., "curvdemo1 has encounterd a problem and needs to close. We are sorry for the inconvienience. Please tell Microsoft about this problem." The dialog contains a button that, when pressed, causes some environment info to be sent to Microsoft.
One of the example programs that leads to this error message is Bode. I traced the problem to the creation of the plot picker, d_picker, in bode.cpp. When the application is run, passing the mouse cursor across the plot region raises the error. If I change the DisplayMode in the constructor call from AlwaysOn to AlwaysOff, the problem goes away. Of course, the picker no longer has its desired effect.
I have the same plot picker problem in a program that I am developing. It worked with Qt 4.3.3 but not with 4.5.0.
The other five qwt example programs that raise the error dialog don't appear to have pickers, and I haven't tracked down what is causing them to fail.
Has anyone else tried running the qwt examples when used with Qt 4.5 under Windows XP? If so, do they all work as they should?
Harry
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
gjennings:
Thanks for the feedback. Since we're both having a similar problem with the qwt examples, I suspect that there must be some kind of adverse interaction between qwt-5.1.1 and Qt 4.5.0. Hopefully the developers of these applications will get it figured out. I haven't upgrade to Qt 4.5.0 on my Linux system yet so I don't know if the problem exists on that OS.
oswalidos:
To get my application to work, I put the following in my .pro file:
- The normal HEADERS and SOURCES sections
- include( C:\qwt-5.1.1\qwtconfig.pri )
- INCLUDEPATH += C:\qwt-5.1.1\src
- LIBS += C:\qwt-5.1.1\lib\qwt5.dll
- QT += qt3support
- CONFIG += release
You may not need the qt3support line. I needed it because I started working on it when I was using Qt 3.3. When I finish replacing the Qt 3 classes with the appropriate Qt 4 classes, I'll get rid of that line.
I didn't have to modify the Makefile that was produced by qmake.
Harry
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Qwt 5.1.1 doesn't work with Qt 4.5.x on Windows. You have to use Qwt from SVN.
Uwe
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Using qwt 5.1.2 from svn fixed the problem for me - many thanks
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Quote:
Originally Posted by
Uwe
Qwt 5.1.1 doesn't work with Qt 4.5.x on Windows. You have to use Qwt from SVN.
Uwe
thanks for information but i can't find a link to download qwt-5.1.2-svn !
could you give me a link ?
thanks in advance
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Quote:
Originally Posted by
hd_harry
gjennings:
oswalidos:
To get my application to work, I put the following in my .pro file:
- The normal HEADERS and SOURCES sections
- include( C:\qwt-5.1.1\qwtconfig.pri )
- INCLUDEPATH += C:\qwt-5.1.1\src
- LIBS += C:\qwt-5.1.1\lib\qwt5.dll
- QT += qt3support
- CONFIG += release
Harry
it's so useful , now i'm able to build a simple application but run-time error persist !
anyway now i can move to learn how to use qwt .
thanks a lot !
1 Attachment(s)
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Uwe:
Thanks for pointing out that I have to use the version of qwt that can be obtained from the Subversion (SVN) web site. I downloaded and installed it, and my plot picker problem is gone.
For those who might also want to download and install that version of qwt (5.3.0), which I assume is a development version, I have attached a pdf file which outlines the steps I went through.
Harry
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Better download the qwt-5.2 branch - It is almost source code compatible to 5.1. ( You could also download from the qwt-5.1 branch, if you need binary compatibility, but it doesn't include all known bug fixes ).
The code from trunk requires porting your code to APIs, that are not stable.
Uwe
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Quote:
Originally Posted by
hd_harry
include( C:\qwt-5.1.1\qwtconfig.pri )
qwtconfig.pri is for building Qwt - not for using it. It is not part of a Qwt installation ( obviously you are running against the build directory and didn't install qwt by make install). And to be honest: the whole thing is much too simple for copying mysterious project files.
All you need to add to your pro file is:
LIBS += /path/to/your/qwt-lib
INCLUDEPATH += /path/to/your/qwt-headers
If you are working with a DLL on Windows you also have to add:
DEFINES += QWT_DLL
--
The Qwt tarball also includes a qwt.prf file. When you have adjusted and installed it, it does the configurations lines above for you and you can simply write:
CONFIG += qwt
But I don't like the concept of prf files much, because they need to be reinstalled, whenever you update your Qt library.
Uwe
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Uwe:
Thanks for your advice. I downloaded and installed the qwt-5.2 branch from the SourceForge SVN web site. For those who have been following this, the Subversion command I used to do this is:
svn co https://qwt.svn.sourceforge.net/svnr...anches/qwt-5.2 qwt-5.2
(See the pdf file three messages back for more details about what I did.)
Both the qwt examples and the program I'm developing work with this version of qwt and Qt 4.5.0.
For my application, I simplified my .pro file as you suggested in the preceding message.
One additional step that I had to take was to add the path to the qwt dll file to my Windows environment PATH variable (e.g., c:\qwt-5.2\lib). The "make" process works fine without adding the path, but trying to run the executables (both the qwt examples and my program) would fail with a Windows message that qwt5.dll could not be found. Possibly the need to add this path could be included in the qwt Install file either under Section C1 or C1-C3.
Harry
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Harry :
i followed your pdf ,i just changed something i make my .pro like this :
Code:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += C:\svn\qwt\qwt\src
LIBS += C:\svn\qwt\qwt\lib\qwtd5.dll
CONFIG += debug
# Input
SOURCES += main.cpp
the problem of qwtd5.dll ,i solve it just by copying it to the debug folder and lauch it ,it works normally .
now i buid my own application with no problem .
but i want to use qwtpicker to pick a curve (rectangular or trapesoidal)
can you tell me how to start ?
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
oswalidos:
I'm using qwt_plot_picker to display the (x, y) coordinate values under the cursor, similar to the bode program in the qwt examples directory. I don't think this is what you are trying to do.
I suggest you take a look at the Event_filter example program. I think it is doing something similar to what you are trying to accomplish.
Harry
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
I am quite confused.
We need or not the qwtd5.dll?
Moreover, in qwt-5.2, after compiling, I cannot find any qwt5.dll, but only the qwtd5.dll.
I don't know if this is the problem that make my application to not start anymore (RunTime errors)
G
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
One additional step that I had to take was to add the path to the qwt dll file to my Windows environment PATH variable (e.g., c:\qwt-5.2\lib).
Harry[/QUOTE]
But I cannot find any qwt5.dll in Qwt-5.2:confused:
G
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Have you built Qwt using qmake?
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
Well, did you edit the "qwtconfig.pri" file?
in that case, try re-downloading the Qwt package and do a re-build, because you might have chosen Qwt to be a static library (the case in which you'll only find a "libqwt.a" file)...
Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP
giusepped,
As Lawand notes, per the INSTALL file that comes with qwt the qwtconfig.pri file may need edited. What I did was comment the "CONFIG += release" line and uncomment the "CONFIG += debug_and_release" and "CONFIG += build_all" lines. Running "qmake qwt.pro" and "make" with those changes resulted in both qwt5.dll and qwtd5.dll being in qwt-5.2.0\lib.
Note that as of March 22nd, qwt-5.2.0 is the current version at SOURCEFORGE.NET so it no longer is necessary to download this version from the Subversion site. I uninstalled the Subversion version and replaced it with the current SOURCEFORGE.NET version. I think there is a typo in the SOURCEFORGE.NET version qwtconfig.pri file. The CONFIG += debug_and_release line I note above reads CONFIG += release_and_release. I changed it to read as CONFIG += debug_and_release as it had been in previous versions.
Harry