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. Compile MQTT library & need to update to latest 5.11
Forum Updated to NodeBB v4.3 + New Features

Compile MQTT library & need to update to latest 5.11

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
31 Posts 6 Posters 11.2k 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.
  • B bhu24
    23 Jul 2018, 07:03

    @SGaist thanks got qmake 5.11.1 and now got error while compiling "qtmqtt" Library

    error: error: unrecognized command line option '-std=c++1z'
    error: error: unrecognized command line option '-Wdate-time'

    @aha_1980 thnaks to you also

    A Offline
    A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on 23 Jul 2018, 07:17 last edited by
    #12

    @bhu24 said in Compile MQTT library & need to update to latest 5.11:

    error: error: unrecognized command line option '-std=c++1z'

    I'm not sure why c++1z (= "c++17") is forced, but your compiler may be too old for that.

    Can you see if c++1z is given in any of the .pro or .pri files?

    Qt has to stay free or it will die.

    B 1 Reply Last reply 24 Jul 2018, 07:03
    0
    • A aha_1980
      23 Jul 2018, 07:17

      @bhu24 said in Compile MQTT library & need to update to latest 5.11:

      error: error: unrecognized command line option '-std=c++1z'

      I'm not sure why c++1z (= "c++17") is forced, but your compiler may be too old for that.

      Can you see if c++1z is given in any of the .pro or .pri files?

      B Offline
      B Offline
      bhu24
      wrote on 24 Jul 2018, 07:03 last edited by
      #13

      @aha_1980 still issue is not resolved

      Previous - error: error: unrecognized command line option '-std=c++1z'
      NEW - error: [.pch/Qt5Mqtt.gch/c++] Error 1

      one error gone but new issue arise!!!

      Solved issue - error: error: unrecognized command line option '-Wdate-time'

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 24 Jul 2018, 08:08 last edited by
        #14

        That's because you're currently using an out of date compiler.

        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
        1
        • B Offline
          B Offline
          bhu24
          wrote on 26 Jul 2018, 06:01 last edited by
          #15

          ![alt text](2_1532584676910_qt_settings3.png 1_1532584676910_qt_settings2.png 0_1532584676910_qt_settings1.png image url)

          Here i am sending screenshot's of my 1. Qt version 2. Compilers 3. Cmake
          So please let me is any thing i am missing so facing this issue!!!!!!

          J 1 Reply Last reply 26 Jul 2018, 06:39
          0
          • B bhu24
            26 Jul 2018, 06:01

            ![alt text](2_1532584676910_qt_settings3.png 1_1532584676910_qt_settings2.png 0_1532584676910_qt_settings1.png image url)

            Here i am sending screenshot's of my 1. Qt version 2. Compilers 3. Cmake
            So please let me is any thing i am missing so facing this issue!!!!!!

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 26 Jul 2018, 06:39 last edited by
            #16

            @bhu24 This is quite a big list of compilers! Do you really need all of them (4.7, 4.8, 4.9)?
            Which compiler do you use? Which is set as compiler in the Kit you're using?

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

            B 1 Reply Last reply 26 Jul 2018, 06:48
            1
            • J jsulm
              26 Jul 2018, 06:39

              @bhu24 This is quite a big list of compilers! Do you really need all of them (4.7, 4.8, 4.9)?
              Which compiler do you use? Which is set as compiler in the Kit you're using?

              B Offline
              B Offline
              bhu24
              wrote on 26 Jul 2018, 06:48 last edited by
              #17

              @jsulm my requirement is to compile "MQTT" library which need qt 5.11.1 higher version and compiler 4.9 as per my knowledge please suggest me solution on same.
              Thanks for help!!

              J 1 Reply Last reply 26 Jul 2018, 07:00
              0
              • B bhu24
                26 Jul 2018, 06:48

                @jsulm my requirement is to compile "MQTT" library which need qt 5.11.1 higher version and compiler 4.9 as per my knowledge please suggest me solution on same.
                Thanks for help!!

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 26 Jul 2018, 07:00 last edited by
                #18

                @bhu24 Did you check whether GCC 4.9 is really set in your Kit?

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

                B 1 Reply Last reply 26 Jul 2018, 07:12
                1
                • J jsulm
                  26 Jul 2018, 07:00

                  @bhu24 Did you check whether GCC 4.9 is really set in your Kit?

                  B Offline
                  B Offline
                  bhu24
                  wrote on 26 Jul 2018, 07:12 last edited by bhu24
                  #19

                  @jsulm yes as you can see in screen shot

                  1. Got compiler output window as follows:
                    home/balkrishna/Desktop/qt/qtmqtt/include/QtMqtt/QtMqttDepends -o .pch/Qt5Mqtt.gch/c++
                    g++: error: unrecognized command line option '-std=c++1z'
                    make[2]: Leaving directory /home/balkrishna/build-qtmqtt-Qt_5_11_1-Debug/src/mqtt' make[1]: Leaving directory /home/balkrishna/build-qtmqtt-Qt_5_11_1-Debug/src'
                    make[2]: *** [.pch/Qt5Mqtt.gch/c++] Error 1
                    make[1]: *** [sub-mqtt-make_first] Error 2
                    make: *** [sub-src-make_first] Error 2
                    12:29:01: The process "/usr/bin/make" exited with code 2.
                    Error while building/deploying project qtmqtt (kit: Qt 5.11.1)
                    When executing step 'Make'

                  2. In Genral message window shows following :

                  /home/balkrishna/Qt5.11.1/5.11.1/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
                  Project ERROR: Library '' is not defined.
                  /home/balkrishna/Qt5.11.1/5.11.1/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
                  Project ERROR: Library '' is not defined.

                  1. In Issue window show following:

                  error: error: unrecognized command line option '-std=c++1z'
                  error: [.pch/Qt5Mqtt.gch/c++] Error 1

                  Any thing is wrong from my side so please let me know and suggest which things should i cross check to resolve this issue

                  J 1 Reply Last reply 26 Jul 2018, 07:14
                  0
                  • B bhu24
                    26 Jul 2018, 07:12

                    @jsulm yes as you can see in screen shot

                    1. Got compiler output window as follows:
                      home/balkrishna/Desktop/qt/qtmqtt/include/QtMqtt/QtMqttDepends -o .pch/Qt5Mqtt.gch/c++
                      g++: error: unrecognized command line option '-std=c++1z'
                      make[2]: Leaving directory /home/balkrishna/build-qtmqtt-Qt_5_11_1-Debug/src/mqtt' make[1]: Leaving directory /home/balkrishna/build-qtmqtt-Qt_5_11_1-Debug/src'
                      make[2]: *** [.pch/Qt5Mqtt.gch/c++] Error 1
                      make[1]: *** [sub-mqtt-make_first] Error 2
                      make: *** [sub-src-make_first] Error 2
                      12:29:01: The process "/usr/bin/make" exited with code 2.
                      Error while building/deploying project qtmqtt (kit: Qt 5.11.1)
                      When executing step 'Make'

                    2. In Genral message window shows following :

                    /home/balkrishna/Qt5.11.1/5.11.1/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
                    Project ERROR: Library '' is not defined.
                    /home/balkrishna/Qt5.11.1/5.11.1/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
                    Project ERROR: Library '' is not defined.

                    1. In Issue window show following:

                    error: error: unrecognized command line option '-std=c++1z'
                    error: [.pch/Qt5Mqtt.gch/c++] Error 1

                    Any thing is wrong from my side so please let me know and suggest which things should i cross check to resolve this issue

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 26 Jul 2018, 07:14 last edited by
                    #20

                    @bhu24 said in Compile MQTT library & need to update to latest 5.11:

                    yes as you can see in screen shot

                    No, I can't as you did not post the screen-shot of your Kit...

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

                    B 1 Reply Last reply 26 Jul 2018, 07:26
                    0
                    • J jsulm
                      26 Jul 2018, 07:14

                      @bhu24 said in Compile MQTT library & need to update to latest 5.11:

                      yes as you can see in screen shot

                      No, I can't as you did not post the screen-shot of your Kit...

                      B Offline
                      B Offline
                      bhu24
                      wrote on 26 Jul 2018, 07:26 last edited by bhu24
                      #21

                      @jsulm ![alt text](0_1532589960239_qt_set_2.png image url)0_1532590075619_qt_set_1.png

                      i tried all one by one

                      1. /usr/bin/x86_64-linux-gnu-gcc-4.9
                      2. /usr/bin/x86_64-linux-gnu-g++-4.9
                      3. /usr/bin/x86_64-linux-gnu-cpp-4.9
                      J 1 Reply Last reply 26 Jul 2018, 07:34
                      0
                      • B bhu24
                        26 Jul 2018, 07:26

                        @jsulm ![alt text](0_1532589960239_qt_set_2.png image url)0_1532590075619_qt_set_1.png

                        i tried all one by one

                        1. /usr/bin/x86_64-linux-gnu-gcc-4.9
                        2. /usr/bin/x86_64-linux-gnu-g++-4.9
                        3. /usr/bin/x86_64-linux-gnu-cpp-4.9
                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 26 Jul 2018, 07:34 last edited by
                        #22

                        @bhu24 Can you show your pro file

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

                        B 1 Reply Last reply 26 Jul 2018, 07:38
                        0
                        • J jsulm
                          26 Jul 2018, 07:34

                          @bhu24 Can you show your pro file

                          B Offline
                          B Offline
                          bhu24
                          wrote on 26 Jul 2018, 07:38 last edited by
                          #23

                          @jsulm ![alt text](0_1532590674090_qt_set_3.png image url)

                          I am using "qtmqtt" folder to compile mqtt library is right or wrong??? please let me know

                          J 1 Reply Last reply 26 Jul 2018, 07:43
                          0
                          • B bhu24
                            26 Jul 2018, 07:38

                            @jsulm ![alt text](0_1532590674090_qt_set_3.png image url)

                            I am using "qtmqtt" folder to compile mqtt library is right or wrong??? please let me know

                            J Offline
                            J Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 26 Jul 2018, 07:43 last edited by
                            #24

                            @bhu24 I'm wondering from where this -std=c++1z is coming.
                            Usually it should be configured like

                            CONFIG += c++11
                            

                            in one of the pro files.

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

                            B 1 Reply Last reply 26 Jul 2018, 08:29
                            1
                            • J jsulm
                              26 Jul 2018, 07:43

                              @bhu24 I'm wondering from where this -std=c++1z is coming.
                              Usually it should be configured like

                              CONFIG += c++11
                              

                              in one of the pro files.

                              B Offline
                              B Offline
                              bhu24
                              wrote on 26 Jul 2018, 08:29 last edited by
                              #25

                              @jsulm
                              i tried that also one by one but no use

                              1. CONFIG += c++11
                              2. CONFIG += c++12
                              3. CONFIG += c++13
                              J 1 Reply Last reply 26 Jul 2018, 08:31
                              0
                              • B bhu24
                                26 Jul 2018, 08:29

                                @jsulm
                                i tried that also one by one but no use

                                1. CONFIG += c++11
                                2. CONFIG += c++12
                                3. CONFIG += c++13
                                J Offline
                                J Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on 26 Jul 2018, 08:31 last edited by
                                #26

                                @bhu24 What I mean is: you should check the pro files and see whether the c++ standard is set there and how.
                                Note: there is no C++12 or C++13

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

                                B 1 Reply Last reply 26 Jul 2018, 08:45
                                0
                                • J jsulm
                                  26 Jul 2018, 08:31

                                  @bhu24 What I mean is: you should check the pro files and see whether the c++ standard is set there and how.
                                  Note: there is no C++12 or C++13

                                  B Offline
                                  B Offline
                                  bhu24
                                  wrote on 26 Jul 2018, 08:45 last edited by
                                  #27

                                  @jsulm in mqtt.pro file they mentioned c++ standard.

                                  from here i download that file of "qtmqtt"

                                  git clone git://code.qt.io/qt/qtmqtt.git

                                  J 1 Reply Last reply 26 Jul 2018, 08:47
                                  0
                                  • B bhu24
                                    26 Jul 2018, 08:45

                                    @jsulm in mqtt.pro file they mentioned c++ standard.

                                    from here i download that file of "qtmqtt"

                                    git clone git://code.qt.io/qt/qtmqtt.git

                                    J Offline
                                    J Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on 26 Jul 2018, 08:47 last edited by
                                    #28

                                    @bhu24 Can you show how they mentioned c++ there, I don't want to check out the project.

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

                                    B 1 Reply Last reply 26 Jul 2018, 09:06
                                    0
                                    • J jsulm
                                      26 Jul 2018, 08:47

                                      @bhu24 Can you show how they mentioned c++ there, I don't want to check out the project.

                                      B Offline
                                      B Offline
                                      bhu24
                                      wrote on 26 Jul 2018, 09:06 last edited by
                                      #29

                                      @jsulm ![alt text](0_1532594947819_qt_set_4.png image url)

                                      here you can see.
                                      can i uninstall all and again start from new installation
                                      Please help me for selection of qt version, cmake, qmake, and gcc or g++ complier for installation and compilation of "qtmqtt" library.

                                      J 1 Reply Last reply 27 Jul 2018, 04:20
                                      0
                                      • B bhu24
                                        26 Jul 2018, 09:06

                                        @jsulm ![alt text](0_1532594947819_qt_set_4.png image url)

                                        here you can see.
                                        can i uninstall all and again start from new installation
                                        Please help me for selection of qt version, cmake, qmake, and gcc or g++ complier for installation and compilation of "qtmqtt" library.

                                        J Offline
                                        J Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on 27 Jul 2018, 04:20 last edited by
                                        #30

                                        @bhu24 Can you try from command line instead of QtCreator?
                                        Go to the qtmqtt source directory:

                                        PATH_TO_YOUR_QT_BIN/qmake
                                        make
                                        make install
                                        

                                        Note: use absolute path to qmake to make sure you use Qt you want to use.

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

                                        1 Reply Last reply
                                        2
                                        • A Offline
                                          A Offline
                                          Andarang
                                          wrote on 8 Jun 2020, 11:22 last edited by
                                          #31

                                          If you're getting the code from GitHub don't forget to checkout a release, otherwise, you'll be working from the dev branch and the code might fail to compile.

                                          so, instead of just
                                          git clone git://code.qt.io/qt/qtmqtt.git

                                          do

                                          git clone git://code.qt.io/qt/qtmqtt.git && git checkout v5.15.0

                                          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