Results 1 to 4 of 4

Thread: Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux

  1. #1
    Join Date
    Dec 2011
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    12
    Thanked 2 Times in 2 Posts

    Default Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux

    I'm unable to get Qwt compiled against QT5 in linux, which is blocking deployment of the solution.

    Uwe, can you or someone offer some help?

    Setup:
    CentOS 6.2
    Qt5.0.1 installed in /opt/qt5.0.1
    Qwt6.1-rc3

    Steps:
    /opt/qt5.0.1/bin/qmake -o Makefile qwt.pro
    cd src
    /opt/qt5.0.1/bin/qmake -o Makefile src.pro
    cd ..
    make

    This results in errors in qwt_dyngrid_layout.h -- qlayout.h: No such file or directory

    So, in src.pro I add

    greaterThan(QT_MAJOR_VERSION, 4) {
    QT += widgets
    QT += printsupport
    QT += concurrent
    }

    And then re-run:
    /opt/qt5.0.1/bin/qmake -o Makefile src.pro

    Which results in:

    Project MESSAGE: Warning: unknown QT: widgets
    Project MESSAGE: Warning: unknown QT: printsupport
    Project MESSAGE: Warning: unknown QT: concurrent

    Questions:
    1. I don't understand why QT += widgets is not in the src.pro file by default (for Qt > v4)?
    2. I don't understand why I'm getting a qmake errors for += widgets (and the other two).


    Note: I can build any of the qt5.0.1 examples and PRO files using the same steps as above. There, I get no warning about QT: widgets.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux

    Building Qwt 6.1 with Qt 5 works out of the box - in your case it looks like a broken Qt installation.

    Uwe

  3. #3
    Join Date
    Dec 2011
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    12
    Thanked 2 Times in 2 Posts

    Default Re: Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux

    SOLVED

    The problem was a conflicting Qt 4.7.3 install in my home directory. For some reason, even though I explicitly called for qmake from the Qt5 install, something in the Qt4 install was still being used.

    Thanks Uwe.

    Can you tell us how you manage Qt4 & Qt5 support without explicitly using the QT += widgets switch in the pro file?

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux

    Quote Originally Posted by alketi View Post
    Can you tell us how you manage Qt4 & Qt5 support without explicitly using the QT += widgets switch in the pro file?
    In my environment nothing needs to be managed and "QT += widgets" is not necessary.

    Uwe

Similar Threads

  1. Compile QWT for ARM linux
    By zuoshulu in forum Qwt
    Replies: 5
    Last Post: 25th February 2012, 09:52
  2. Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?
    By hochl in forum Installation and Deployment
    Replies: 4
    Last Post: 1st April 2011, 22:19
  3. Can't Compile on Ubuntu Linux
    By mpauley in forum Newbie
    Replies: 6
    Last Post: 9th April 2010, 23:00
  4. How do I compile for linux on windows?
    By waitingforzion in forum Newbie
    Replies: 4
    Last Post: 28th December 2009, 08:51
  5. Replies: 4
    Last Post: 12th January 2006, 05:16

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
  •  
Qt is a trademark of The Qt Company.