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. Alternative to ZeroMQ / nzmqt

Alternative to ZeroMQ / nzmqt

Scheduled Pinned Locked Moved General and Desktop
zeromqnzmqtmingw
13 Posts 5 Posters 10.0k 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.
  • _ Offline
    _ Offline
    _Mark_
    wrote on last edited by
    #1

    Hi!
    I'm looking for a simple and straightforward solution to exchange data among Qt applications. In the past I used ZeroMQ with its wrapper nzmqt.

    Now I have a lot of trouble to get it to work under Windows (and nzmqt is still based on version 3.2.x of ZeroMQ).

    Basically I need a way to transmit and receive plain-text (or standard data-types) among several Qt5 applications. Usually one of them is the "server" which listen for incoming connections, but each client should be able to send data asynchronously. I also need a way to send a broadcast packet (I mean every application will receive that).

    Would you recommend another way to achieve that?
    It would be great using only the classes provided by the Qt framework!

    Thanks!
    Mark

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

      Hi,

      Maybe QLocalServer and QLocalSocket would be of interest ?

      Hope it helps

      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
      • SGaistS SGaist

        Hi,

        Maybe QLocalServer and QLocalSocket would be of interest ?

        Hope it helps

        _ Offline
        _ Offline
        _Mark_
        wrote on last edited by _Mark_
        #3

        @SGaist

        As far as i understand this work only for LOCAL connections, doesn't it?
        I need to connect also remote applications.

        Currently I'm playing with the QUdpSocket class to see if could be a solution for me.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi,

          just to talk, why you don't like ZeroMQ? We just started to introduce it in our code to replace standard sockets (we use for PUB/SUB)

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          D 1 Reply Last reply
          0
          • _ Offline
            _ Offline
            _Mark_
            wrote on last edited by
            #5

            I like ZeroMQ very much! I love it :-)

            But as I said in the first post I cannot get it to work under Windows. Basically I have two problems: I can successfully compile ZeroMQ only with MinGW provided by the RubyDevKit. I'm afraid it requires a different libstdc++-6.dll from the one provided in the MinGW version which comes from the QtSDK. In fact, launching my application leads to an error about that library.
            Furthermore the Qt wrapper (nzmqt) is still based upon the version 3.2.x of ZeroMQ (this is not a big deal, though).

            I tried to compile ZeroMQ with the MinGW from the Qt5 SDK but it doesn't understand the "fail" commands in the Makefile:

            $(RECURSIVE_TARGETS):
            @fail= failcom='exit 1'; \
            

            And I cannot use MSVC to compile both ZeroMQ and Qt5.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on last edited by
              #6

              Have you tried with pre-built Windows packages (http://zeromq.org/distro:microsoft-windows)?

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              _ 1 Reply Last reply
              0
              • TheBadgerT Offline
                TheBadgerT Offline
                TheBadger
                wrote on last edited by
                #7

                Hi,

                I also would like to know the answer to this.

                @mcosta said:

                Have you tried with pre-built Windows packages (http://zeromq.org/distro:microsoft-windows)?

                The pre-build packages are only for MSVC

                I think you are missing the following part of @_Mark_ response:

                @_Mark_ said:

                And I cannot use MSVC to compile both ZeroMQ and Qt5.

                I am not sure if this is due to a constraint (he must use MinGW) or due to an issue (he can't get it working with MSVC). I hope it is the first one since Qt has pre-built MSVC installers which in theory means it should just work.

                I also had the exact same issues where I was forced to use MinGW and could not get ZeroMQ compiled using the MinGW used for Qt.

                My solution was to abandon ZeroMQ until I find something better or a solution. For now I am using normal SSH over TCP/IP sockets.


                Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

                _ 1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by
                  #8

                  I think you are missing the following part of @Mark response:

                  You're right I completely misunderstood what Mark said.

                  @_Mark_ have you tried to contact directly the ZeroMQ developers?

                  Once your problem is solved don't forget to:

                  • Mark the thread as SOLVED using the Topic Tool menu
                  • Vote up the answer(s) that helped you to solve the issue

                  You can embed images using (http://imgur.com/) or (http://postimage.org/)

                  1 Reply Last reply
                  0
                  • M mcosta

                    Have you tried with pre-built Windows packages (http://zeromq.org/distro:microsoft-windows)?

                    _ Offline
                    _ Offline
                    _Mark_
                    wrote on last edited by
                    #9

                    @mcosta
                    I have tried, but I got the following errors:

                    error: undefined reference to `vtable for nzmqt::PollingZMQContext'
                    bad reloc address 0x2 in section `.text$_ZN3zmq7error_tD1Ev[__ZN3zmq7error_tD1Ev]'
                    

                    They are beyond my knowledge.

                    M 1 Reply Last reply
                    0
                    • TheBadgerT TheBadger

                      Hi,

                      I also would like to know the answer to this.

                      @mcosta said:

                      Have you tried with pre-built Windows packages (http://zeromq.org/distro:microsoft-windows)?

                      The pre-build packages are only for MSVC

                      I think you are missing the following part of @_Mark_ response:

                      @_Mark_ said:

                      And I cannot use MSVC to compile both ZeroMQ and Qt5.

                      I am not sure if this is due to a constraint (he must use MinGW) or due to an issue (he can't get it working with MSVC). I hope it is the first one since Qt has pre-built MSVC installers which in theory means it should just work.

                      I also had the exact same issues where I was forced to use MinGW and could not get ZeroMQ compiled using the MinGW used for Qt.

                      My solution was to abandon ZeroMQ until I find something better or a solution. For now I am using normal SSH over TCP/IP sockets.

                      _ Offline
                      _ Offline
                      _Mark_
                      wrote on last edited by
                      #10

                      @TheBadger
                      Thanks for your answer. Yes, the use of MinGW is a constraint.

                      @mcosta
                      I haven't tried yet to contact the ZeroMQ developers. I'm going to do now.

                      1 Reply Last reply
                      0
                      • _ _Mark_

                        @mcosta
                        I have tried, but I got the following errors:

                        error: undefined reference to `vtable for nzmqt::PollingZMQContext'
                        bad reloc address 0x2 in section `.text$_ZN3zmq7error_tD1Ev[__ZN3zmq7error_tD1Ev]'
                        

                        They are beyond my knowledge.

                        M Offline
                        M Offline
                        mcosta
                        wrote on last edited by
                        #11

                        @_Mark_ said:

                        @mcosta
                        I have tried, but I got the following errors:

                        error: undefined reference to `vtable for nzmqt::PollingZMQContext'
                        bad reloc address 0x2 in section `.text$_ZN3zmq7error_tD1Ev[__ZN3zmq7error_tD1Ev]'
                        

                        They are beyond my knowledge.

                        This error is related to nzmqt, are you able to build libzmq with MinGW?

                        Usually in Qt you get this error when you use signals/slots in a class not using the Q_OBJECT macro. (I'm sorry now I'm on Mac and I cannot try in Windows).

                        My suggestion is:

                        1. try to build and use the last version of ZMQ (nzmqt is pretty old);
                        2. try if is possible to use nzqmt with the MinGW compiler used in Qt

                        Once your problem is solved don't forget to:

                        • Mark the thread as SOLVED using the Topic Tool menu
                        • Vote up the answer(s) that helped you to solve the issue

                        You can embed images using (http://imgur.com/) or (http://postimage.org/)

                        _ 1 Reply Last reply
                        0
                        • M mcosta

                          @_Mark_ said:

                          @mcosta
                          I have tried, but I got the following errors:

                          error: undefined reference to `vtable for nzmqt::PollingZMQContext'
                          bad reloc address 0x2 in section `.text$_ZN3zmq7error_tD1Ev[__ZN3zmq7error_tD1Ev]'
                          

                          They are beyond my knowledge.

                          This error is related to nzmqt, are you able to build libzmq with MinGW?

                          Usually in Qt you get this error when you use signals/slots in a class not using the Q_OBJECT macro. (I'm sorry now I'm on Mac and I cannot try in Windows).

                          My suggestion is:

                          1. try to build and use the last version of ZMQ (nzmqt is pretty old);
                          2. try if is possible to use nzqmt with the MinGW compiler used in Qt
                          _ Offline
                          _ Offline
                          _Mark_
                          wrote on last edited by
                          #12

                          @mcosta
                          As said before, I'm able to build libzmq only with MinGW from RubyDevKit. The one contained into the Qt5 SDK doesn't compile ZeroMQ.

                          I know, usually, that message is related to the missing of Q_OBJECT macro, but I'm pretty sure it's there. Of course I may be wrong, I'll give it another try.

                          Anyway, about your hints:

                          1. nzmqt is pretty old (unfortunately) but I would like to use signals and slots to interact with ZeroMQ
                          2. The MinGW which I use for Qt5 it's the same for nzqmt! The problem is libzmq...
                          1 Reply Last reply
                          0
                          • M mcosta

                            Hi,

                            just to talk, why you don't like ZeroMQ? We just started to introduce it in our code to replace standard sockets (we use for PUB/SUB)

                            D Offline
                            D Offline
                            doubitchou
                            wrote on last edited by
                            #13

                            @mcosta said in Alternative to ZeroMQ / nzmqt:

                            Hi,

                            just to talk, why you don't like ZeroMQ? We just started to introduce it in our code to replace standard sockets (we use for PUB/SUB)

                            Ciao Massimo,
                            is it possible to provide some simple Qt examples of that usage please ?
                            Just to understand how to configure from Qt.

                            E possibile per te darmi Qt esempii per quel'uso. solo per capire come configurarlo

                            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