Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building Qwt with Qt5
Qt 6.11 is out! See what's new in the release blog

Building Qwt with Qt5

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 11.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RatzzR Offline
    RatzzR Offline
    Ratzz
    wrote on last edited by Ratzz
    #1

    I am trying to install Qwt version qwt-5.2 and my Qt version is Qt 5.5.0.
    I installed Qwt using svn command

    svn checkout svn://svn.code.sf.net/p/qwt/code/branches/qwt-5.2 
    

    Then i ran qmake qwt.pro which gave me cannot find /usr/lib/i386-linux-gnu/qt4/bin/qmake so i installed qmake using apt-get install qt4 qmake . which allowed me to run make

    root@user-ThinkCentre-A70:/home/user/qwt-5.2# make
    cd src/ && make -f Makefile 
    make[1]: Entering directory `/home/user/qwt-5.2/src'
    compiling qwt_abstract_scale_draw.cpp
    qwt_abstract_scale_draw.cpp:12:22: fatal error: qpainter.h: No such file or directory
     #include <qpainter.h>
                          ^
    compilation terminated.
    make[1]: *** [obj/qwt_abstract_scale_draw.o] Error 1
    make[1]: Leaving directory `/home/user/qwt-5.2/src'
    make: *** [sub-src-make_default-ordered] Error 2
    

    with qtchooser (/usr/lib/i386-linux-gnu/qt-default/qtchooser/default.conf) saying

    /usr/lib/i386-linux-gnu/qt4/bin
    /usr/lib/i386-linux-gnu
    

    So removed Qwt-5.2 and installed Qwt-6.1 which allowed to run qmake but not make

    root@user-ThinkCentre-A70:/home/rathan/qwt-6.1# make
    cd src/ && /usr/lib/i386-linux-gnu/qt4/bin/qmake /home/user/qwt-6.1/src/src.pro -o Makefile
    cd src/ && make -f Makefile 
    make[1]: Entering directory `/home/rathan/qwt-6.1/src'
    compiling qwt_abstract_scale_draw.cpp
    In file included from qwt_abstract_scale_draw.h:13:0,
                     from qwt_abstract_scale_draw.cpp:10:
    qwt_global.h:13:21: fatal error: qglobal.h: No such file or directory
     #include <qglobal.h>
                         ^
    compilation terminated.
    make[1]: *** [obj/qwt_abstract_scale_draw.o] Error 1
    make[1]: Leaving directory `/home/user/qwt-6.1/src'
    make: *** [sub-src-make_default-ordered] Error 2
    

    with qtchooser edited to (/usr/lib/i386-linux-gnu/qt-default/qtchooser/default.conf) with no joy.

    /usr/lib/i386-linux-gnu/qt5/bin
    /usr/lib/i386-linux-gnu
    

    But my qmake is in /opt/Qt5.5.0/5.5/gcc/bin/qmake path so just pointed the qtchooser to it to check if it works but it gave me

    root@user-ThinkCentre-A70:/home/user/qwt-6.1# make
    cd src/ && ( test -e Makefile || /opt/Qt5.5.0/5.5/gcc/bin/qmake /home/user/qwt-6.1/src/src.pro -o Makefile ) && make -f Makefile 
    make[1]: Entering directory `/home/user/qwt-6.1/src'
    make[1]: *** No rule to make target `/usr/share/qt4/mkspecs/linux-g++/qmake.conf', needed by `Makefile'.  Stop.
    make[1]: Leaving directory `/home/user/qwt-6.1/src'
    make: *** [sub-src-make_first-ordered] Error 2
    

    what is that i missed??

    --Alles ist gut.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by
      #2

      I've used Qwt 6.1 with Qt 5.5 (and 5.6). It looks like your problem is mixing Qt versions. Did you re-run qmake using the 5.5 qmake (you might have to completely clean the build folder instead of just re-running the correct qmake).

      1 Reply Last reply
      1
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by A Former User
        #3

        Hi! I just tried it myself. I'm on openSUSE leap 42 and I'm using Qt5.6.0 (gcc 64 bit). This Qt version is installed in /opt/Qt5.6.0. The following works for me:

        • Download qwt-6.1.2.tar.bz2 to ~/Downloads/qwt-6.1.2.tar.bz2
        • Extract to ~/Downloads/qwt-6.1.2
        • Start Qt Creator. Open project: ~/Downloads/qwt.pro. Configure project with kit of your choice. I used gcc 64.
        • Build project for release (takes some time).
        • Close Qt Creator.
        • Open a terminal.
        • cd ~/Downloads/build-qwt-Desktop_Qt_5_6_0_GCC_64bit-Release/
        • become superuser: su (enter password)
        • make install
        • back to normal user: exit
        • append the following to ~/.bashrc:
        QT_PLUGIN_PATH="/usr/local/qwt-6.1.2/plugins:$QT_PLUGIN_PATH"
        export QT_PLUGIN_PATH
        
        • log out of current x session and log in again (or reboot, what ever)

        • Start Qt Creator. Create new Widgets project. Go to forms designer. Qwt widgets are now available. Add one of the widgets to your main form.

        • Go to the new project's *.pro file. Include qwt there, so the file should look similar to this:

        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        TARGET = untitled5
        TEMPLATE = app
        
        # ****** INCLUDE QWT  *********
        include ( /usr/local/qwt-6.1.2/features/qwt.prf )
        
        SOURCES += main.cpp\
                mainwindow.cpp
        
        HEADERS  += mainwindow.h
        
        FORMS    += mainwindow.ui
        
        • Run your shiny new program :-)
        1 Reply Last reply
        4
        • RatzzR Offline
          RatzzR Offline
          Ratzz
          wrote on last edited by Ratzz
          #4

          @mchinand
          Thanks for the reply . Yes i did re-run qmake using 5.5.
          @Wieland
          Woow!
          Thanks . It just worked for me :)

          --Alles ist gut.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved