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. Error occurs while building QtMqtt module
Forum Updated to NodeBB v4.3 + New Features

Error occurs while building QtMqtt module

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 817 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.
  • F Offline
    F Offline
    franc
    wrote on last edited by franc
    #1

    Hi all, I am trying to build QtMqtt module on Windows 10 (using VS Dev14 command line developer tool).

    Following the indications found on Google, I have cloned http://code.qt.io/cgit/qt/qtmqtt.git/ in C:\Qt\5.11.1\Src, and I performed the following commands:

    mkdir build
    pushd build
    qmake -r ..
    nmake
    

    Everything goes fine (or I hope so) until qmake -r .., and with nmake the compilation of qmqttclient.cpp, qmqttconnection.cpp, qmqttcontrolpacket.cpp, qmqttmessage.cpp and qmqttsubscription.cpp goes fine too.

    When it's the turn of qmqtttopicfilter.cpp I get two errors, which do not allow me to proceed further:

    C:\Qt\5.11.1\Src\qtmqtt\src\mqtt\qmqtttopicfilter.cpp(207): error C2678: binary '==': no operator found which takes a left-hand operand of type 'QString' (or there is no acceptable conversion)
    
    C:\Qt\5.11.1\Src\qtmqtt\src\mqtt\qmqtttopicfilter.cpp(225): error C2678: binary '!=': no operator found which takes a left-hand operand of type 'const QStringRef' (or there is no acceptable conversion)
    

    Please, take into account that I have three different versions of Qt installed (5.7, 5.11.1 and 5.11.2), and I have not excluded incompatibility issues, even though I did not find any.


    Edit:
    changing the lines

    (206)      || d->filter == QLatin1Char('#')
    (207)      || d->filter == QLatin1String("/#"))) {
    

    with

    (206)      || d->filter == QString('#')
    (207)      || d->filter == QString("/#"))) {
    

    and the line

    (225)      if (level != QLatin1Char('+') && level != topicLevels.at(i))
    
    

    with

    (225)      if (level != QString('+') && level != topicLevels.at(i))
    
    

    solves the problem. I do not have tested it yet, anyway.

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

      Hi,

      What exact version of the compiler are you using ?
      What branch are you trying to build ?

      On a side note, you should rathe use out of source builds.

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

      F 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        What exact version of the compiler are you using ?
        What branch are you trying to build ?

        On a side note, you should rathe use out of source builds.

        F Offline
        F Offline
        franc
        wrote on last edited by franc
        #3

        @SGaist

        Hi, I am building branch 5.11, and the compiler is exactly the following:

        Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
        

        Two further things:

        • The same errors as above are marked even on Qt Creator.
        • I have run the example MQTT Subscriptions Example with the above modifications, and everything goes fine.
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I'd suspect an issue with your compiler: QString::operator==(QLatin1String other) has been there for a long time.

          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

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved