Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to add library(qmqtt.h) in qmqtt client for windows
QtWS25 Last Chance

how to add library(qmqtt.h) in qmqtt client for windows

Scheduled Pinned Locked Moved Solved General and Desktop
59 Posts 7 Posters 29.5k 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 shravani

    @jsulm
    when i click on build all one dialog box came like below.but in build folder(build-abc-Desktop_Qt_5_8_1_MinGW_32bit-Debug) .lib file not generated only 3 folders(.moc, .obj , .pch) created .!!0_1498626615873_Capture.PNG

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #14

    @shravani It looks like you're clicking on Run not on Build. Since mqtt is a lib you cannot execute it. And again: can you post the build log?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    S 1 Reply Last reply
    1
    • jsulmJ jsulm

      @shravani It looks like you're clicking on Run not on Build. Since mqtt is a lib you cannot execute it. And again: can you post the build log?

      S Offline
      S Offline
      shravani
      wrote on last edited by shravani
      #15

      @jsulm
      sorry ,i can only post what i got after building in build folder.0_1498628025184_build_image.PNG!0_1498628076971_build.PNG

      jsulmJ raven-worxR 2 Replies Last reply
      0
      • S shravani

        @jsulm
        sorry ,i can only post what i got after building in build folder.0_1498628025184_build_image.PNG!0_1498628076971_build.PNG

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #16

        @shravani Why can't you post the build log? You have it in QtCreator. The screen-shots you posted do not help.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S shravani

          @jsulm
          sorry ,i can only post what i got after building in build folder.0_1498628025184_build_image.PNG!0_1498628076971_build.PNG

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #17

          @shravani
          got the folder where you donwloaded qmqtt (where the qmqtt.pro resides) and and execute the following:

          1. qmake
          2. nmake (for Visual Studio compiler) or mingw32-make (for mingw)

          thats it. No QtCreator needed.
          Then the .dll and corresponding .lib (MSVC) or .a (mingw32) file will be created in the output folder.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          S 1 Reply Last reply
          1
          • raven-worxR raven-worx

            @shravani
            got the folder where you donwloaded qmqtt (where the qmqtt.pro resides) and and execute the following:

            1. qmake
            2. nmake (for Visual Studio compiler) or mingw32-make (for mingw)

            thats it. No QtCreator needed.
            Then the .dll and corresponding .lib (MSVC) or .a (mingw32) file will be created in the output folder.

            S Offline
            S Offline
            shravani
            wrote on last edited by shravani
            #18

            @raven-worx
            thank you,
            im new to qt could you please tell me how to execute qmake and mingw32-make in windows?

            raven-worxR 1 Reply Last reply
            0
            • S shravani

              @raven-worx
              thank you,
              im new to qt could you please tell me how to execute qmake and mingw32-make in windows?

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by raven-worx
              #19

              @shravani
              open a console window and execute "qmake" let it finished and afterwards execute one of the two (the correct one corresponding to your used compiler!) make commands for building.

              Make sure that the executable can be found by the system (add the paths to the PATH environment variable)
              But those a pretty basics. Probably you should go on reading some learning material first before trying to build a software which is based on a 3rd party library.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              S 1 Reply Last reply
              1
              • raven-worxR raven-worx

                @shravani
                open a console window and execute "qmake" let it finished and afterwards execute one of the two (the correct one corresponding to your used compiler!) make commands for building.

                Make sure that the executable can be found by the system (add the paths to the PATH environment variable)
                But those a pretty basics. Probably you should go on reading some learning material first before trying to build a software which is based on a 3rd party library.

                S Offline
                S Offline
                shravani
                wrote on last edited by shravani
                #20

                @raven-worx
                can u give any link to read? and where .lib will be created? in same folder?

                raven-worxR 1 Reply Last reply
                0
                • S shravani

                  @raven-worx
                  can u give any link to read? and where .lib will be created? in same folder?

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #21

                  @shravani
                  Getting started.
                  Probably you should consider buying a book about Qt also

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  S 1 Reply Last reply
                  1
                  • raven-worxR raven-worx

                    @shravani
                    Getting started.
                    Probably you should consider buying a book about Qt also

                    S Offline
                    S Offline
                    shravani
                    wrote on last edited by
                    #22

                    @raven-worx
                    but using qtcreator also, run qmake is possible right?why am i not getting .lib file file?can you see screenshots of my debug folder (above)after building.

                    raven-worxR 1 Reply Last reply
                    0
                    • S shravani

                      @raven-worx
                      but using qtcreator also, run qmake is possible right?why am i not getting .lib file file?can you see screenshots of my debug folder (above)after building.

                      raven-worxR Offline
                      raven-worxR Offline
                      raven-worx
                      Moderators
                      wrote on last edited by
                      #23

                      @shravani
                      yes, but especially when you are not completley sure what you are doing there are some pitfalls.
                      You can try to build using QtCreator, but then do not press the Run/Debug button, but the Build button below.

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      S 1 Reply Last reply
                      2
                      • raven-worxR raven-worx

                        @shravani
                        yes, but especially when you are not completley sure what you are doing there are some pitfalls.
                        You can try to build using QtCreator, but then do not press the Run/Debug button, but the Build button below.

                        S Offline
                        S Offline
                        shravani
                        wrote on last edited by shravani
                        #24

                        @raven-worx
                        hi,
                        after building i came to know qmqtt.lib was created(5th line from last).but i could not find it inorder to add that path to .pro file.can u please tell by default where it will be stored? in build/debug also it is not present(see above post).

                        thank you

                        0_1498707021202_build_log.PNG

                        raven-worxR 1 Reply Last reply
                        0
                        • dheerendraD Offline
                          dheerendraD Offline
                          dheerendra
                          Qt Champions 2022
                          wrote on last edited by
                          #25

                          Most easiest way is to hit windows search button, search that file and find that directory. Specify this directory in pro file.

                          Dheerendra
                          @Community Service
                          Certified Qt Specialist
                          http://www.pthinks.com

                          1 Reply Last reply
                          2
                          • S shravani

                            @raven-worx
                            hi,
                            after building i came to know qmqtt.lib was created(5th line from last).but i could not find it inorder to add that path to .pro file.can u please tell by default where it will be stored? in build/debug also it is not present(see above post).

                            thank you

                            0_1498707021202_build_log.PNG

                            raven-worxR Offline
                            raven-worxR Offline
                            raven-worx
                            Moderators
                            wrote on last edited by
                            #26

                            @shravani
                            according to this log in the \bin directory.

                            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                            If you have a question please use the forum so others can benefit from the solution in the future

                            S 1 Reply Last reply
                            0
                            • raven-worxR raven-worx

                              @shravani
                              according to this log in the \bin directory.

                              S Offline
                              S Offline
                              shravani
                              wrote on last edited by shravani
                              #27

                              @raven-worx
                              thank you very much. now i added that .lib file to .pro file and build all is successful.but as the program start executing im getting this error while debugging.can u please look into it?
                              i dont understand which dll file is missing and where to add it?

                              0_1498793774462_Capture.PNG

                              jsulmJ 1 Reply Last reply
                              0
                              • S shravani

                                @raven-worx
                                thank you very much. now i added that .lib file to .pro file and build all is successful.but as the program start executing im getting this error while debugging.can u please look into it?
                                i dont understand which dll file is missing and where to add it?

                                0_1498793774462_Capture.PNG

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #28

                                @shravani How do you start the app? From QtCreator?
                                On Windows you can use http://www.dependencywalker.com/ to find out which libraries an application needs.
                                If you want to start your app outside of QtCreator then you first need to deploy it: http://doc.qt.io/qt-5/windows-deployment.html

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                S 1 Reply Last reply
                                1
                                • jsulmJ jsulm

                                  @shravani How do you start the app? From QtCreator?
                                  On Windows you can use http://www.dependencywalker.com/ to find out which libraries an application needs.
                                  If you want to start your app outside of QtCreator then you first need to deploy it: http://doc.qt.io/qt-5/windows-deployment.html

                                  S Offline
                                  S Offline
                                  shravani
                                  wrote on last edited by
                                  #29

                                  @jsulm

                                  im running it in qtcreator, not outside.inside qt also do i need to include?

                                  jsulmJ 1 Reply Last reply
                                  0
                                  • S shravani

                                    @jsulm

                                    im running it in qtcreator, not outside.inside qt also do i need to include?

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #30

                                    @shravani In QtCreator it should work. Use http://www.dependencywalker.com to see what is missing.
                                    Besides the lib file - do you have the DLL? Lib file is needed for linking, but DLL is needed at runtime.
                                    Also can you show how you added the lib to pro file?

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    S 1 Reply Last reply
                                    1
                                    • jsulmJ jsulm

                                      @shravani In QtCreator it should work. Use http://www.dependencywalker.com to see what is missing.
                                      Besides the lib file - do you have the DLL? Lib file is needed for linking, but DLL is needed at runtime.
                                      Also can you show how you added the lib to pro file?

                                      S Offline
                                      S Offline
                                      shravani
                                      wrote on last edited by
                                      #31

                                      @jsulm
                                      in this src/ qmqtt.h,.. and .lib files are there.so added that path.

                                      INCLUDEPATH += C:\Qt\qmqtt-master\src
                                      LIBS += -LC:\Qt\qmqtt-master\src -lqmqtt

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • S shravani

                                        @jsulm
                                        in this src/ qmqtt.h,.. and .lib files are there.so added that path.

                                        INCLUDEPATH += C:\Qt\qmqtt-master\src
                                        LIBS += -LC:\Qt\qmqtt-master\src -lqmqtt

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #32

                                        @shravani
                                        Again: you need the DLL file to be able to execute your app. Where is qmqtt.dll (or libqmqtt.dll)?

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        S 1 Reply Last reply
                                        1
                                        • jsulmJ jsulm

                                          @shravani
                                          Again: you need the DLL file to be able to execute your app. Where is qmqtt.dll (or libqmqtt.dll)?

                                          S Offline
                                          S Offline
                                          shravani
                                          wrote on last edited by shravani
                                          #33

                                          @jsulm
                                          it is inside src only.do i need to add anywhere else again?
                                          after building library it created in /bin so i copied from there to src folder

                                          jsulmJ 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