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. [Solved]Adding QWT Library to Qt creator
Qt 6.11 is out! See what's new in the release blog

[Solved]Adding QWT Library to Qt creator

Scheduled Pinned Locked Moved Installation and Deployment
24 Posts 7 Posters 52.9k 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.
  • D Offline
    D Offline
    DenisKormalev
    wrote on last edited by
    #2

    What do you mean by "adding to Qt Creator"? It is IDE. Maybe you want to add it to your project?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Vijaeendra
      wrote on last edited by
      #3

      Yeah.. Adding it to my project.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #4

        Look at qmake LIBS keyword in Assistant.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dialingo
          wrote on last edited by
          #5

          Creator even has an assistant for adding libraries.
          Open your .pro file and right click into the .pro file.
          Now you will see an "add library" item in the context menu.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vijaeendra
            wrote on last edited by
            #6

            I m working on linux platform. All I have is the .so files and all the header/class files. How to link it to the Qt creator project.

            I dont seem to have an add library option on right clicking my .pro file. Rather, I jus have an option to add some random files(C++ class , Resource file and the QML file).

            Is Qmake option similar to " LIBS += -L/usr/local/lib -lmath" ??

            Please help.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dbzhang800
              wrote on last edited by
              #7

              [quote author="Vijaeendra" date="1310362001"]

              Is Qmake option similar to " LIBS += -L/usr/local/lib -lmath" ??

              [/quote]
              yeah, you are right.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Vijaeendra
                wrote on last edited by
                #8

                I m facing a trouble at the linking phase. I have added a DEPENDPATH to my library file.., the .so file names are as follows..,

                libqwt.so
                libqwt.so.6
                libqwt.so.6.0
                libqwt.so.6.0.0
                libqwtmathml.so
                libqwtmathml.so.6
                libqwtmathml.so.6.0
                libqwtmathml.so.6.0.0

                I tried
                LIBS += -llibqwtmathml, which is not working.

                I also tried giving the complete path but did not help.
                Can u please help me in adding this .,

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vijaeendra
                  wrote on last edited by
                  #9

                  My .pro file is

                  QT += core gui

                  LIBS += -llibqwt
                  -llibqwtmathml

                  TARGET = plottrial
                  TEMPLATE = app

                  SOURCES += main.cpp
                  plotmatrix.cpp

                  HEADERS += plotmatrix.h

                  INCLUDEPATH += /home/viju/Desktop/qwt-6.0.0/src

                  DEPENDPATH += /home/viju/Desktop/qwt-6.0.0/lib

                  FORMS += plotmatrix.ui

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    Vijaeendra
                    wrote on last edited by
                    #10

                    Well, It should be

                    LIBS += -L//home/viju/Desktop/qwt-6.0.0/lib -lqwt

                    But I still have dynamic linking problem.

                    1 Reply Last reply
                    0
                    • EddyE Offline
                      EddyE Offline
                      Eddy
                      wrote on last edited by
                      #11

                      bq. I m working on linux platform. All I have is the .so files and all the header/class files. How to link it to the Qt creator project.

                      What Linux are you on and what version? This can be important to know because not all linux boxes use the same way to let the run-time linker known the path to a shared library .

                      Qt Certified Specialist
                      www.edalsolutions.be

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        Vijaeendra
                        wrote on last edited by
                        #12

                        Ubuntu-10.10

                        thanks

                        1 Reply Last reply
                        0
                        • EddyE Offline
                          EddyE Offline
                          Eddy
                          wrote on last edited by
                          #13

                          In that case I think i can help you out. I've succeeded using QWT in kubuntu 10.10 and had to look at the ubuntu help pages to solve it out. So it should work for you too.

                          of course you have to adapt the paths.

                          in shell :

                          1. Add the ld.so configuration file :
                            echo "/usr/local/qwt-6.0.0-rc5/lib" | sudo tee /etc/ld.so.conf.d/qwt.conf
                          2. Update the cache :
                            sudo ldconfig -v

                          put this in your pro file :

                          @#QWT

                          QWT_LOCATION = /usr/local/qwt-6.0.0-rc5/

                          INCLUDEPATH += $${QWT_LOCATION}/include/
                          LIBS = -L$${QWT_LOCATION}/lib
                          -lqwt@
                          If you later decide to "uninstall" the libraries, just remove the conf file and run sudo ldconfig again.

                          Qt Certified Specialist
                          www.edalsolutions.be

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            Vijaeendra
                            wrote on last edited by
                            #14

                            Can u please explain the command . I have qwt folder on the desktop. also there isnt qwt.conf file.
                            I m not able to edit any of the configuration files. But, I m sure once i add this path it ll surely work.

                            Thanks.

                            1 Reply Last reply
                            0
                            • EddyE Offline
                              EddyE Offline
                              Eddy
                              wrote on last edited by
                              #15

                              Did you compile qwt?

                              If not open the pro file in Qt Creator and compile it.

                              Then follow my instructions.

                              Qt Certified Specialist
                              www.edalsolutions.be

                              1 Reply Last reply
                              0
                              • V Offline
                                V Offline
                                Vijaeendra
                                wrote on last edited by
                                #16

                                I have compiled Qwt, I m able to run all the qwt example projects too. But i cant find qwt.conf file.

                                I need to know the exact procedure for gaining rights to edit the configuration files.

                                1 Reply Last reply
                                0
                                • EddyE Offline
                                  EddyE Offline
                                  Eddy
                                  wrote on last edited by
                                  #17

                                  Did you follow my instructions? You have to do that first.

                                  Qt Certified Specialist
                                  www.edalsolutions.be

                                  1 Reply Last reply
                                  0
                                  • V Offline
                                    V Offline
                                    Vijaeendra
                                    wrote on last edited by
                                    #18

                                    Yeah I did.. I got it.

                                    I had to change LD_ LIBRARY _PATH.

                                    Thanks for the help.

                                    1 Reply Last reply
                                    0
                                    • EddyE Offline
                                      EddyE Offline
                                      Eddy
                                      wrote on last edited by
                                      #19

                                      Glad to hear that.

                                      Could you please add [solved] in your title?

                                      Qt Certified Specialist
                                      www.edalsolutions.be

                                      1 Reply Last reply
                                      0
                                      • V Offline
                                        V Offline
                                        vinay
                                        wrote on last edited by
                                        #20

                                        Hi..I have gone through the above discussion as I am facing the same problem(using qwt with qt creator).
                                        I have downloaded qwt-6.0.1 package,but I am unable to install it.
                                        I am using ubuntu 10.10.
                                        When I 'qmake' it succeeds,but when I 'make' it it gives fatal errors like "qdebug.h No such file" etc..
                                        What should I do?

                                        1 Reply Last reply
                                        0
                                        • U Offline
                                          U Offline
                                          uranusjr
                                          wrote on last edited by
                                          #21

                                          There is a qwtconfig.pri in the source containing all the options you can modify when building it.

                                          By default, Qwt builds .prf files that contains necessary settings to use in you project's .pro file. If you set them correctly, you can set the necessary libs and includes by adding

                                          @CONFIG += qwt@

                                          in your .pro file.

                                          There are two ways to let qmake detect these .prf files. qmake searches for .prf files in certain locations, so you can either:

                                          1. Instruct Qwt to copy those files into the default search paths when it is built.

                                          2. Add Qwt's feature path into qmake's searching paths.

                                          3. Manually copy those feature files into qmake's search paths.

                                          4. is the easiest. Just uncomment this line
                                            @# QWT_INSTALL_FEATURES = $${QT_INSTALL_PREFIX}/features@
                                            in qwtconfig.pri, and then build it (qmake, make, makeinstall).

                                          If you don't want to install Qwt every time you upgrade Qt, you can use 2. or 3. instead. By default, the feature files are in a feature folder in Qwt's install path. Those are the configure files you need qmake to find. The correct paths to setup (or copy files into) are detailed in Qt "documentation":http://doc.trolltech.com/4.7/qmake-advanced-usage.html#adding-new-configuration-features

                                          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