Alternative to ZeroMQ / nzmqt
-
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 -
-
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.
-
Have you tried with pre-built Windows packages (http://zeromq.org/distro:microsoft-windows)?
-
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.
-
-
@_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:
- try to build and use the last version of ZMQ (nzmqt is pretty old);
- try if is possible to use nzqmt with the MinGW compiler used in Qt
-
@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:
- nzmqt is pretty old (unfortunately) but I would like to use signals and slots to interact with ZeroMQ
- The MinGW which I use for Qt5 it's the same for nzqmt! The problem is libzmq...
-
@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