Results 1 to 5 of 5

Thread: Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= instead

  1. #1
    Join Date
    May 2011
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= instead

    Hi,

    I am currently using QT 4.8 and MingW compiler for my application. I am using third party libraries (Qxt & QWT). Now I want to port our application to Qt5. Qxt library is successfully build.

    Steps followed for building Qxt:

    Qt Code:
    1. qmake
    2. mingw32-make
    3. mingw32-make install
    To copy to clipboard, switch view to plain text mode 

    qxt.prf and qxtvars.prf file are copied to C:\Qt\Qt5.0.2\5.0.2\mingw47_32\mkspecs\features

    In application's .pro file I have mentioned

    Qt Code:
    1. CONFIG += qxt
    2. QXT += core gui
    To copy to clipboard, switch view to plain text mode 

    When I compiled it I am getting the errors

    Qt Code:
    1. Project WARNING: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= instead.
    2. Project ERROR: No module matching library 'QxtGui' found.
    To copy to clipboard, switch view to plain text mode 


    Could you please guide me resolving this issue?

    Thanks in advance.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= ins

    Qt Code:
    1. QT += qxt
    2. QXT += core gui
    To copy to clipboard, switch view to plain text mode 
    I expect the CONFIG line is not required.

  3. #3
    Join Date
    May 2011
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= ins

    Thanks Chris.

    I tried your solution but getting following error:

    Qt Code:
    1. QT += qxt
    2. QXT += core gui
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. Project ERROR: Unknown module(s) in QT: qxt
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= ins

    Then qxt.prf is not in the folder that the version of qmake you are using is looking. It should have been put in the correct place (for the version of Qt that owned the qmake you used) automatically when you ran "mingw32-make install" during the Qxt build.

    Edit: Execute:
    Qt Code:
    1. qmake -query
    To copy to clipboard, switch view to plain text mode 
    and look for the QMAKE_MKSPECS entry. The "features" folder should be immediately under that folder and contain qxt.prf.
    Last edited by ChrisW67; 5th February 2014 at 07:16. Reason: updated contents

  5. #5
    Join Date
    May 2011
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qxt with Qt5.0 MingW: qtAddLibrary() is deprecated. Use qtAddModule() or QT+= ins

    Hi Chris,

    I tried qmake -query command I got following output where QMAKE_MKSPECS entry was not present

    Qt Code:
    1. QT_SYSROOT:
    2. QT_INSTALL_PREFIX:D:\Qt\Qt5.0.2\5.0.2\mingw47_32
    3. QT_INSTALL_ARCHDATA:D:\Qt\Qt5.0.2\5.0.2\mingw47_32
    4. QT_INSTALL_DATA:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\
    5. QT_INSTALL_DOCS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\doc
    6. QT_INSTALL_HEADERS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\include
    7. QT_INSTALL_LIBS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\lib
    8. QT_INSTALL_LIBEXECS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\libexec
    9. QT_INSTALL_BINS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin
    10. QT_INSTALL_TESTS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\tests
    11. QT_INSTALL_PLUGINS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\plugins
    12. QT_INSTALL_IMPORTS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\imports
    13. QT_INSTALL_QML:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\qml
    14. QT_INSTALL_TRANSLATIONS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\translations
    15. QT_INSTALL_CONFIGURATION:
    16. QT_INSTALL_EXAMPLES:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\examples
    17. QT_INSTALL_DEMOS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\examples
    18. QT_HOST_PREFIX:D:\Qt\Qt5.0.2\5.0.2\mingw47_32
    19. QT_HOST_DATA:D:\Qt\Qt5.0.2\5.0.2\mingw47_32
    20. QT_HOST_BINS:D:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin
    21. QMAKE_SPEC:win32-g++
    22. QMAKE_XSPEC:win32-g++
    23. QMAKE_VERSION:3.0
    24. QT_VERSION:5.0.2
    To copy to clipboard, switch view to plain text mode 

    Then I manually added it
    Qt Code:
    1. QMAKE_MKSPECS:C:\Qt\Qt5.0.2\5.0.2\mingw47_32\mkspecs
    To copy to clipboard, switch view to plain text mode 

    After compilation I got following error:
    Qt Code:
    1. Project ERROR: Unknown module(s) in QT: qxt
    To copy to clipboard, switch view to plain text mode 

    -Ujwala

Similar Threads

  1. Was QtService deprecated in Qt4.8
    By learning_qt in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2012, 10:30
  2. QPainterPath set operations deprecated in Qt 4.8
    By ravi.xolve in forum Qt Programming
    Replies: 2
    Last Post: 6th June 2011, 06:15
  3. Deprecated warnings still appear
    By Caius Aérobus in forum Qt Programming
    Replies: 0
    Last Post: 29th March 2010, 08:25
  4. Ubuntu: Wno-deprecated does not work
    By Caius Aérobus in forum Qt Programming
    Replies: 0
    Last Post: 2nd February 2010, 14:08
  5. Replies: 3
    Last Post: 12th August 2007, 02:43

Tags for this Thread

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.