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. Adding libs (QT += ...) didn't work
QtWS25 Last Chance

Adding libs (QT += ...) didn't work

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 4 Posters 2.8k 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.
  • J Offline
    J Offline
    jareq000
    wrote on last edited by
    #1

    Hello.
    I have a problem with adding new libs to project.
    I try add "xml" to QT += core, but that didn't work. Nothing changes.

    My workspace:
    Qt 5.3 MinGW 32bit (auto-detected)
    MinGW 4.8.2 32bit (auto-detected)

    How can i add new libraries?
    I try various options, but it failed to.
    Please help
    Jareq000

    Screen:

    !http://i58.tinypic.com/f5dp5c.jpg(Screen)!

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      hii
      Add QT += xml
      http://qt-project.org/doc/qt-5/qtxml-index.html

      Be Cute

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gennon
        wrote on last edited by
        #3

        Hi,

        You should add the contents of your .pro file as well, since that is where the relevant items is located.

        And instead of a screenshot, please just add the text in a code tag.

        /Gen

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jareq000
          wrote on last edited by
          #4

          That's my .pro file:

          @TEMPLATE = app
          CONFIG += console
          CONFIG -= app_bundle
          CONFIG -= qt

          SOURCES += main.cpp

          QT += core
          QT += xml

          INCLUDEPATH += C:/Qt/Qt5.3.1/5.3/mingw482_32/include
          @

          and that didn't work.

          I think, that QT can't find the libraries. I tried to add them, but it didn't work. Where can I check if everything is ok?

          1 Reply Last reply
          0
          • ZlatomirZ Offline
            ZlatomirZ Offline
            Zlatomir
            wrote on last edited by
            #5

            Did you run qmake after you modified the .pro file? If not, run qmake (you can find it in Build menu in Creator) and after that the linker should find the xml module libraries.
            And also the include should work without the module name:
            @
            #include <QFile>
            #include <QDomDocument>
            //...
            @

            https://forum.qt.io/category/41/romanian

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jareq000
              wrote on last edited by
              #6

              Yes, i run qmake.
              If I include this line, Qt warns:
              @ error: QFile: No such file or directory
              #include <QFile>@

              1 Reply Last reply
              0
              • ZlatomirZ Offline
                ZlatomirZ Offline
                Zlatomir
                wrote on last edited by
                #7

                Why do you have
                @CONFIG -= qt@
                in your pro file?Remove that line and try again.

                https://forum.qt.io/category/41/romanian

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jareq000
                  wrote on last edited by
                  #8

                  It work's! :D

                  @CONFIG -= qt@

                  was added automatically, but why?

                  Thanks for replies.

                  1 Reply Last reply
                  0
                  • ZlatomirZ Offline
                    ZlatomirZ Offline
                    Zlatomir
                    wrote on last edited by
                    #9

                    Maybe you chose a "non qt" application when you created the project.

                    https://forum.qt.io/category/41/romanian

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jareq000
                      wrote on last edited by
                      #10

                      Yes, I choose.
                      Now I understand.
                      Thank You.

                      1 Reply Last reply
                      0
                      • IamSumitI Offline
                        IamSumitI Offline
                        IamSumit
                        wrote on last edited by
                        #11

                        hi that's really great ..
                        Please marked thread title as SOLVED so other members can seem it as solved.

                        Be Cute

                        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