[Interest] [Development] Linux: Qt support with ZeroMQ..
Frédéric Marchal
frederic.marchal at wowtechnology.com
Mon Jan 27 11:33:59 CET 2014
> I have qt toolchain as -
>
> $ /usr/lib64/qt4/bin/qmake -v
> QMake version 2.01a
> Using Qt version 4.6.2 in /usr/lib64
>
> With 'makefile' command, it does generate the Makefile
> $/usr/lib64/qt4/bin/qmake-qt4 -makefile
>
> But while doing 'make', it gives below error message -
>
>
> # make
> g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W
> -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB
> -I/usr/lib64/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore
> -I/usr/include -I. -o main.o main.cc
> g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W
> -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB
> -I/usr/lib64/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore
> -I/usr/include -I. -o ZmqContext.o ZmqContext.cc
> g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W
> -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB
> -I/usr/lib64/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore
> -I/usr/include -I. -o ZmqSocket.o ZmqSocket.cc
> In file included from ZmqSocket.cc:5:
> /usr/local/include/zmq.h: In member function âbool
> ZmqSocket::send(ZmqMessage&, int)â:
> /usr/local/include/zmq.h:354: error: too few arguments to function âint
> zmq_send(void*, const void*, size_t, int)â
> ZmqSocket.h:42: error: at this point in file
> /usr/local/include/zmq.h: In member function âbool
> ZmqSocket::recv(ZmqMessage*, int)â:
> /usr/local/include/zmq.h:356: error: too few arguments to function âint
> zmq_recv(void*, void*, size_t, int)â
> ZmqSocket.h:54: error: at this point in file
> make: *** [ZmqSocket.o] Error 1
As the error messages imply, there is an incompatibility between ZmqSocket.h
and zmq.h version 4.
In ZmqSocket.h, at line 42, I read this:
int rc = zmq_send(socket_, &msg, flags);
while zmq.h defines zmq_send as
ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
So, the compiler is right. One argument is missing in ZmqSocket.h.
It looks like ZmqSocket.h was designed to work with ZeroMQ version 2 as
described here:
https://github.com/wttw/zeromqt/blob/master/README.markdown
It may be compatible with ZeroMQ version 3 as far as zmq_send is concerned.
You have to give it a try.
Frédéric
More information about the Interest
mailing list