0

运行以下命令安装 jzmq

git clone https://github.com/zeromq/jzmq.git
cd jzmq
./autogen.sh
./configure
touch src/classdist_noinst.stamp
cd src
CLASSPATH=.:./.:$CLASSPATH javac -d . org/zeromq/ZMQ.java org/zeromq/ZMQException.java org/zeromq/ZMQQueue.java org/zeromq/ZMQForwarder.java org/zeromq/ZMQStreamer.java
make

Making all in src
make[1]: Entering directory `/home/jzmq/src'
make  all-am
make[2]: Entering directory `/home/jzmq/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   -D_REENTRANT -             D_THREAD_SAFE  -I/usr/java/default/include -I/usr/java/default/include/linux -Wall -g -O2 -MT libjzmq_la-Socket.lo -MD -MP -MF .deps/libjzmq_la-Socket.Tpo -c -o libjzmq_la-Socket.lo `test -f 'Socket.cpp' || echo './'`Socket.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/java/default/include -I/usr/java/default/include/linux -Wall -g -O2 -MT libjzmq_la-    Socket.lo -MD -MP -MF .deps/libjzmq_la-Socket.Tpo -c Socket.cpp  -fPIC -DPIC -o .libs/libjzmq_la-Socket.o
Socket.cpp: In function ‘jint Java_org_zeromq_ZMQ_00024Socket_sendByteBuffer(JNIEnv*, _jobject*, _jobject*, jint)’:
Socket.cpp:576: error: cannot convert ‘jbyte*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_send(void*, zmq_msg_t*, int)’
Socket.cpp: In function ‘jint Java_org_zeromq_ZMQ_00024Socket_recvByteBuffer(JNIEnv*, _jobject*, _jobject*, jint)’:
Socket.cpp:708: error: cannot convert ‘jbyte*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_recv(void*, zmq_msg_t*, int)’
Socket.cpp: At global scope:
Socket.cpp:507: warning: ‘jboolean s_zerocopy_init(JNIEnv*, zmq_msg_t*, _jobject*, jint)’ defined but not used
make[2]: *** [libjzmq_la-Socket.lo] Error 1
make[2]: Leaving directory `/home/jzmq/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jzmq/src'
make: *** [all-recursive] Error 1
4

2 回答 2

1

你的zeroMQ是什么版本的?如果你用的是2.x版本,就拿jzmq那个“git clone https://github.com/nathanmarz/jzmq.git

于 2013-06-11T06:47:00.423 回答
0

我认为您安装了不兼容的 ZeroMQ 版本(可能是 2.x)

尝试构建和安装最新的 3.2.3 库。

于 2013-06-09T11:56:16.150 回答