Help with converting the source of project built with Qt 4.4.0 and Qwt 5.1.1 to work with Qt 4.8.3 an Qt 6.0.1

  • Hello Everyone,

    I am very new to working Qt (just a few days now). I have a project that was built with older versions of Qt and Qwt, 4.4.0 and 5.1.1 respectively. The project was built to run on a windows system; I am trying to build a similar project on an Android system. I have been successful with installing Qt 4.8.3 and Qwt 6.0.1 on my current system (Visual Studio 2010 32-bit, Windows 7 64-bit) but I have spent the last several days really struggling with building Qt 4.4.0 and Qwt 5.1.1. While I would eventually like to learn how to build the older versions if that is necessary, what is most important to me now and in my critical path is getting the project to work and understand its design on whatever versions of Qt and Qwt I have running. If the possibility of modifying the project to work with what I have exists, I was hoping if anyone would be willing to walk me through the necessary steps of accomplishing this.

    I have copied the "README" for the my project below. Any help would be greatly appreciated. Thank you very much.

    Best regards,


    • PC with Windows XP.
    • A fast PC or a lot of time, preferably both.

    Download and building of VC++ 2008 Express and Qt libraries:

    1. Download Visual C++ 2008 Express Edition (VC++) from microsofts website:

    2. Download Qt’s open source version 4.4.0 from Trolltech’s web site:
      Latest Version:

    3. Install VC++.

    4. Unzip Qt sources to "c:\Qt\4.4.0"

    5. Go to [Control Panel]->[System]->[Advanced] and click on Environment Variables
      Add: Variable name = "PATH" and Variable value = " " to User variables
      Add: Variable name = "QMAKESPEC" and Variable value = "win32-msvc2008" to System variables
      Add: Variable name = "QTDIR" and Variable value = "c:\Qt\4.4.0" to System variables

    6. Open Visual Studio 2008 Command Promt from your start menu.
      Change directory to where Qt was unzipped: "cd c:\Qt\4.4.0"

    7. Type: "configure", and select "y" when asked. This will take 30-60min.

    8. Type: "nmake". This will take 1-4 hours.

    nmake failed compiling xrefwrap.
    Fix: Remove the "#include <xmath.h>" line from the file MathExtras.h which is in c:\qt\4.4.0\src\3rdparty\webkit\JavaScriptCore\wtf\MathExtras.h

    1. Open VC++ 2008 IDE, select [Tools]->[Option]->[Projects and Soulutions]->[VC++ Directories]
      and add following settings:
      --> [Executable files]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Bin"
      --> [Include files]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Include"
      --> [Library files]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Lib"

    The following steps enable QWT, the graphics extension for the plotting widgets:

    1. Download QWT v5.1.1:

    2. Extract QWT to C:\Qt\qwt-5.1.1

    3. Open qwtconfig.pri (found in C:\Qt\qwt-5.1.1)
      a) Update the INSTALLBASE path. (INSTALLBASE = C:/Qt/Qwt-5.1.1)
      b) Comment out QwtDesigner at the bottom of file (#CONFIG += QwtDesigner)
      c) Uncomment QwtExamples at the bottom of the file (CONFIG += QwtExamples)

    4. Open examples.pri (found in C:\Qt\qwt-5.1.1\examples)
      a) Change msvc2005 to msvc2008 in the line "win32-msvc2005:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib"

    5. Open Visual Studio 2008 Command Prompt to build Qwt. Examples will be output to the examples\bin directory.

    cd c:\qt\qwt-5.1.1

    Building application:

    1. Go to the folder where the application has been unzipped.
    2. Copy \images directory to \release\images
    3. Find and place the following files in the /release directory (all files are included in the binary release of this program and placed in c:\Program Files\Texas Instruments\eZ430-RF2500-SEH Sensor Monitor):
    1. Microsoft.VC90.CRT.manifest
    2. msvcp90.dll
    3. msvcr90.dll
    4. QtCore4.dll
    5. QtGui4.dll
    6. qwt5.dll
    1. Run "qmake" from the command promt. This will create the required project file for Visual Studio.
    2. Open sensMon.vcproj with Visual Studio.
    3. If necessary, change configuration from Debug to Release (in top tool bar).
    4. Open project settings and change character settings to use unicode characters.
      Project -> sensMon properties -> Configuration Properties -> General -> Character Set = Use Unicode Char. set.
    5. Build -> Build Project [F7]

    The information in this file is based on the description given on the following web site:

    Additional information can also be found in the INSTALL file that follow the Qt source packet.

  • I'm not sure that I can help you but in order to use qwt and Qt (using qtcreator and mingw) I inserted in my .pro file these rows:
    INCLUDEPATH += ../../qwt-6.0.1/src
    unix {
    INCLUDEPATH += ../../ffmpeg-1.0/
    unix:!mac {
    LIBS += ../../qwt-6.0.1/lib/
    LIBS += ../../qwt-6.0.1/lib/
    unix:mac {
    LIBS += ../../qwt-6.0.1/lib/qwt.framework/qwt
    LIBS += ../../qwt-6.0.1/lib/qwtmathml.framework/qwtmathml
    windows {
    LIBS += ../../qwt-6.0.1/lib/libqwt.a
    LIBS += ../../qwt-6.0.1/lib/libqwtmathml.a
    Now I can build my application for Linux and Windows. In Windows only with Qt 4.7.4 because the latest version has a bug on using external libraries.

    [Edit: Added @ tags around code -- mlong]

  • Thank you! I'm using the Qt SDK now and that has helped a lot with installing other versions of Qt. However, there appear to be significant distinctions between Qwt 5 and Qwt 6... enough that I would have to have really know what I'm doing before making any changes to the source. My next strategy is to use the Qt SDK update manager to download the sources straight from the repositories. The only issue with this is that I have only found ftp and git repositories and I'm having a difficult time configuring the SDK to work with them.

  • Even if you don't want to do the migration from Qwt 5 to Qwt 6 ( a lot has changed as Qwt 5 supports Qt 3+4 and Qwt 6 Qt 4+5 ) you should use Qwt 5.2 ( still maintained ! ) instead of a Qwt 5.1 version that is from the stone ages.

    When deciding to use Qwt 6 consider to use Qwt 6.1 ( code from SVN trunk, will be released shortly after Qt5 ). It will work with Qt5 and has many, many new features compared to 6.0.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.