Linux——ZMQ环境搭建

1、下载源码:http://download.zeromq.org/zeromq-2.1.7.tar.gz

2、编译安装zmq:
    $ ./configure
    $ make
    $ sudo make install
    $ sudo ldconfig

3、拷贝动态库:cp libzmq.so libzmq.so.3 libzmq.so.3.0.0  /lib -R

4、简易Makefile:

OBJ = server
top_builddir = ~/zeromq/zeromq-3.2.4
CC = g++ 
INCLUDES = -I$(top_builddir)/include 

LIBS = -lzmq -lpthread 

all:
    $(CC) $(OBJ).cpp $(INCLUDES) $(LIBS) -o $(OBJ)

clean:
    rm -rf $(OBJ)

你可能感兴趣的:(Linux)