activemq依赖apr,apr依赖libtool,openssl等。
apr 依赖的库
可能linux原先并没有安装libtool,autoconf,automake,openssl,需要安装下,否则编译apr的时候会报错。
libtool,autoconf,automake下载地址:
ftp://ftp.gnu.org/gnu/
#autoconf-2.70
./configure
make
make install
#automake-1.16
./bootstrap
./configure
make
make install
#libtool-2.4.6
#./bootstrap
./configure
make
make install
下载openssl,https://www.openssl.org/
#openssl-1.1.01
./config
./Configure
make
make install
cms依赖apr
APR-Apache Portable Runtime Project.
https://apr.apache.org/download.cgi
#apr-1.7.0
./buildconf
./configure --prefix=/home/usinglibs/apr #安装路径需要建立
make
make install
CMS Client
The CMS API is a JMS-like API for C++ for interfacing with Message Brokers such as Apache ActiveMQ.
下载地址:
https://activemq.apache.org/components/cms/
这里:activemq-cpp-library-3.9.5-src.tar.gz
tar -zxvf activemq-cpp-library-3.9.5-src.tar.gz
cd activemq-cpp-library-3.9.5
./configure --prefix=/home/usinglibs/activemq --with-apr=/usr/usinglibs/apr
make
make install
编译好了对应位置有相应的lib和头文件。
本人下载使用的库分享“linux下activemq及其依赖库.zip”:
链接:https://pan.baidu.com/s/14Rn-riiY-GOB_E4TIXsCYw
提取码:kfao
示例看我的这篇文章
Windows下实现C++ 连接ActiveMQ:https://blog.youkuaiyun.com/lishenluo/article/details/107864758?spm=1001.2014.3001.5502