Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

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

    General and Desktop
    7
    59
    21962
    Loading More Posts
    • 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 @raven-worx last edited by shravani

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

      raven-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @shravani last edited by

        @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 Reply Quote 1
        • S
          shravani @raven-worx last edited by

          @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-worx 1 Reply Last reply Reply Quote 0
          • raven-worx
            raven-worx Moderators @shravani last edited by

            @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 Reply Quote 2
            • S
              shravani @raven-worx last edited by 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-worx 1 Reply Last reply Reply Quote 0
              • dheerendra
                dheerendra Qt Champions 2022 last edited by

                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 Reply Quote 2
                • raven-worx
                  raven-worx Moderators @shravani last edited by

                  @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 Reply Quote 0
                  • S
                    shravani @raven-worx last edited by 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

                    jsulm 1 Reply Last reply Reply Quote 0
                    • jsulm
                      jsulm Lifetime Qt Champion @shravani last edited by

                      @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 Reply Quote 1
                      • S
                        shravani @jsulm last edited by

                        @jsulm

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

                        jsulm 1 Reply Last reply Reply Quote 0
                        • jsulm
                          jsulm Lifetime Qt Champion @shravani last edited by

                          @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 Reply Quote 1
                          • S
                            shravani @jsulm last edited by

                            @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

                            jsulm 1 Reply Last reply Reply Quote 0
                            • jsulm
                              jsulm Lifetime Qt Champion @shravani last edited by

                              @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 Reply Quote 1
                              • S
                                shravani @jsulm last edited by shravani

                                @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

                                jsulm 1 Reply Last reply Reply Quote 0
                                • jsulm
                                  jsulm Lifetime Qt Champion @shravani last edited by

                                  @shravani The DLL must be in a directory where the operating system is looking for shared libraries when loading an app. Fastest way is to copy it to the build directory of your app (where your executable is).

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

                                  S 2 Replies Last reply Reply Quote 2
                                  • S
                                    shravani @jsulm last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 1
                                    • S
                                      shravani @jsulm last edited by

                                      @jsulm
                                      i added all dlls but now getting this error
                                      0_1498976658348_error.png

                                      1 Reply Last reply Reply Quote 0
                                      • SGaist
                                        SGaist Lifetime Qt Champion last edited by

                                        Hi,

                                        You can't start an application like that from explorer, you first have to follow the same steps you would before deploying your application on another computer.

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

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          shravani @SGaist last edited by shravani

                                          @SGaist
                                          In Qt creator also I'm getting same error after adding ucrtbased.dll to debug folder.
                                          i tried executing examples given in qt but getting same error.
                                          recently i installed this qt 5.8.1 msvc2015 new version because in qt 5.0 it(mqtt) is not working.

                                          0_1499045791448_error2.png 0_1499045799223_path.png

                                          jsulm 1 Reply Last reply Reply Quote 0
                                          • jsulm
                                            jsulm Lifetime Qt Champion @shravani last edited by

                                            @shravani Which DLLs exactly did you copy and from where? No need to copy ucrtbased.dll when starting from QtCreator.

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

                                            S 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post