Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to link libraries like qxt or qwt?
QtWS25 Last Chance

How to link libraries like qxt or qwt?

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 2 Posters 2.3k Views
  • 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.
  • S Offline
    S Offline
    Skyrpex
    wrote on last edited by
    #1

    Hi folks,

    I'm wondering how do Qxt and Qwt build their libraries so we can include later on like this
    @CONFIG += qxt
    QXT = core gui@

    I'm looking at the sources but I'm getting lost! Thanks.

    Edit: I'm diving into it and found about .prf files and the QtDir/mkspecs/features folder. What should I do when compiling my lib to place the .prf file so a user compiling my lib can use it in CONFIG?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      the prf files is the secret you are searching. Look in e.g. /usr/local/qwt-6.1.0-svn/features

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Skyrpex
        wrote on last edited by
        #3

        Hi SGaist, thanks for the reply (funny, I've edited my answer just before you post).

        I'll dive more now I know about prf files. Thanks.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          You can find some information in qmake's documentation under "qmake Advance Usage" chapter "Adding New Configuration Features"

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Skyrpex
            wrote on last edited by
            #5

            I've finally got it working, but I think I've found a bug:
            when I compile using Qt Creator, the make instruction doesn't include the headers and libs I've declared in my prf file.

            When I do inside the terminal (qmake & make) I can see the include headers and libs, and effectively builds fine.

            Should I report a bug?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you update an environment variable on the console ? If so, the environment in QtCreator might be outdated so it doesn't reflect what you did

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Skyrpex
                wrote on last edited by
                #7

                The problem is that the qmake I was using through terminal belongs to another Qt version. I didn't even know I had Qt5.0.2 along with Qt5.1.1, funny!

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Naughty phantom Qt install... :-D

                  Glad you found out !

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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