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. qtmqtt build on windows
Forum Updated to NodeBB v4.3 + New Features

qtmqtt build on windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
18 Posts 5 Posters 4.3k 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.
  • SGaistS SGaist

    If you did nothing special, then you have the dev branch checked out. Switch the the branch matching your Qt version.

    A Offline
    A Offline
    AndreaFurlani
    wrote on last edited by
    #8

    @SGaist Thank you for your fast reply, how can I do that?

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

      Using git checkout <name of the branch/tag>

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

      A 2 Replies Last reply
      0
      • SGaistS SGaist

        Using git checkout <name of the branch/tag>

        A Offline
        A Offline
        AndreaFurlani
        wrote on last edited by
        #10
        This post is deleted!
        1 Reply Last reply
        0
        • SGaistS SGaist

          Using git checkout <name of the branch/tag>

          A Offline
          A Offline
          AndreaFurlani
          wrote on last edited by
          #11

          @SGaist I downloaded the correct version (for Qt 5.15) but now it returns a new error:

          In file included from qmqttauthenticationproperties.cpp:30:
          qmqttauthenticationproperties.h:33:10: fatal error: QtMqtt/qmqttglobal.h: no such file or directory
             33 | #include <QtMqtt/qmqttglobal.h>
                |          ^~~~~~~~~~~~~~~~~~~~~~
          compilation terminated.
          make[2]: *** [Makefile:528: .obj/qmqttauthenticationproperties.o] Error 1
          make[2]: exit from directory «/home/furla/Scaricati/qtmqtt/src/mqtt»
          make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2
          make[1]: exit from directory «/home/furla/Scaricati/qtmqtt/src»
          make: *** [Makefile:49: sub-src-make_first] Error 2
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #12

            Did you cleanup before restarting the build ?

            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
            • A Offline
              A Offline
              AndreaFurlani
              wrote on last edited by
              #13

              What do you mean with cleanup?

              SGaistS 1 Reply Last reply
              0
              • A Offline
                A Offline
                AndreaFurlani
                wrote on last edited by
                #14

                Following this thread https://forum.qt.io/topic/100705/how-can-i-use-the-qtmqtt-code/14 , I remove all the "QtMqtt" from the headers files, now I can build the project without errors.
                On the other hand when I run the project, in the application output panel I get this error:

                10:41:49: Starting /home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub ...
                10:41:49: The process failed to start. Either the invoked program "/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub" is missing, or you may have insufficient permissions to invoke the program.
                10:41:49: Cannot execute "/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub": no such File or directory
                10:41:49: /home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub exited with code -1
                

                I looked into the folder and there are:

                • MakeFile
                  *Makefile.qtmqtt_pub
                  *MakeFile.qtmqtt_sub

                And if I use the command make in this folder I get this error:

                In file included from /home/furla/Qt/EDALAB/qtmqtt-5.15/examples/mqtt/consolepubsub/main_pub.cpp:51:
                /home/furla/Qt/EDALAB/qtmqtt-5.15/examples/mqtt/consolepubsub/configuration.h:59:10: fatal error: QMqttClient: no such File or directory
                   59 | #include <QMqttClient>
                      |          ^~~~~~~~~~~~~
                compilation terminated.
                make[1]: *** [Makefile.qtmqtt_pub:719: .obj/main_pub.o] Error 1
                make[1]: exit from directory «/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub»
                make: *** [Makefile:61: sub-qtmqtt_pub-pro-install_subtargets-ordered] Error 2
                
                1 Reply Last reply
                0
                • A AndreaFurlani

                  What do you mean with cleanup?

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #15

                  @AndreaFurlani said in qtmqtt build on windows:

                  What do you mean with cleanup?

                  Nuke the build folder to ensure there's no stuff from your failed attempt that will influence this new one.

                  Then ensure you have all the required tools to build Qt from git since you cloned the sources from there. Since you are on Linux, it is likely the case but better check then guess.

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

                  A 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @AndreaFurlani said in qtmqtt build on windows:

                    What do you mean with cleanup?

                    Nuke the build folder to ensure there's no stuff from your failed attempt that will influence this new one.

                    Then ensure you have all the required tools to build Qt from git since you cloned the sources from there. Since you are on Linux, it is likely the case but better check then guess.

                    A Offline
                    A Offline
                    AndreaFurlani
                    wrote on last edited by AndreaFurlani
                    #16

                    @SGaist Ok I already deleted everything before to retry and as I described above I'm getting a new error.
                    I think I have all the right tools installed and also the Qt Creator options should be ok since I can run every example project without problems.
                    Moreover, instead of using the command clone, I maually downloaded the .zip folder from git corresponding to my Qt version

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

                      Can you give what your actual state is now ?
                      Did you build the module successfully ?
                      If so, did you call the equivalent of make install ?

                      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
                      • ThirdStrandT Offline
                        ThirdStrandT Offline
                        ThirdStrand
                        wrote on last edited by
                        #18

                        For other searchers!

                        There is a dependency package, at least on RPi by the name of:

                        qt5base-private-dev

                        in order to build qtmqtt.

                        @SGaist , thanks for the prompt on git checkout <version> as I keep forgetting that detail when seeking a specific version.

                        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