Results 1 to 20 of 20

Thread: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

  1. #1
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  2. #2

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    I see the same behavior

  3. #3
    Join Date
    Mar 2009
    Location
    Tunisia
    Posts
    38
    Thanks
    12
    Platforms
    Windows

    Question !!!help!!!!

    hello ,
    I have the same problem ,but i can only run the examples ,i can't compile my own application, i don't know how to modify makefile after qmake -project ,qmake *.pro .
    can you specify how did you test your application ?
    how should i modify my .pro or makefile?
    i need to make a plot picker and display some 2D plot ,i'm blocked !
    thanks in advance
    Last edited by oswalidos; 7th March 2009 at 18:57.

  4. #4
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  5. The following user says thank you to hd_harry for this useful post:

    oswalidos (8th March 2009)

  6. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  7. The following user says thank you to Uwe for this useful post:

    hd_harry (9th March 2009)

  8. #6

    Default 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

  9. #7
    Join Date
    Mar 2009
    Location
    Tunisia
    Posts
    38
    Thanks
    12
    Platforms
    Windows

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    Quote Originally Posted by Uwe View Post
    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

  10. #8
    Join Date
    Mar 2009
    Location
    Tunisia
    Posts
    38
    Thanks
    12
    Platforms
    Windows

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    Quote Originally Posted by hd_harry View Post
    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 !

  11. #9
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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
    Attached Files Attached Files

  12. The following 4 users say thank you to hd_harry for this useful post:

    babu198649 (19th June 2009), HyperB (2nd May 2009), modified_bessel (23rd July 2010), oswalidos (9th March 2009)

  13. #10
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  14. #11
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    Quote Originally Posted by hd_harry View Post
    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

  15. The following user says thank you to Uwe for this useful post:

    Lawand (2nd April 2009)

  16. #12
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  17. The following user says thank you to hd_harry for this useful post:

    eclarkso (8th October 2009)

  18. #13
    Join Date
    Mar 2009
    Location
    Tunisia
    Posts
    38
    Thanks
    12
    Platforms
    Windows

    Default 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 :
    Qt Code:
    1. TEMPLATE = app
    2. TARGET =
    3. DEPENDPATH += .
    4. INCLUDEPATH += C:\svn\qwt\qwt\src
    5. LIBS += C:\svn\qwt\qwt\lib\qwtd5.dll
    6. CONFIG += debug
    7. # Input
    8. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    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 ?

  19. #14
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  20. #15
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  21. #16
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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
    G

  22. #17
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    Have you built Qwt using qmake?

  23. #18
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem using qwt-5.1.1 with Qt 4.5 under Windows XP

    Yes, I did.

  24. #19
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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)...

  25. #20
    Join Date
    Feb 2007
    Location
    Cerritos, CA USA
    Posts
    6
    Thanks
    1
    Thanked 7 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  26. The following user says thank you to hd_harry for this useful post:

    giusepped (10th April 2009)

Similar Threads

  1. Thread problem with windows
    By vratojr in forum Qt Programming
    Replies: 17
    Last Post: 16th June 2006, 08:34
  2. problem of porting from windows to linux
    By jyoti kumar in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2006, 08:42
  3. Replies: 10
    Last Post: 28th April 2006, 15:48
  4. Problem building Qt4.1.0 with thread support on windows XP
    By pavithra in forum Installation and Deployment
    Replies: 1
    Last Post: 1st April 2006, 11:35
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.