activemq依赖apr,apr依赖libtool,openssl等。
apr 依赖的库
可能linux原先并没有安装libtool,autoconf,automake,openssl,需要安装下,否则编译apr的时候会报错。 libtool,autoconf,automake下载地址: ftp://ftp.gnu.org/gnu/
./configure
make
make install
./bootstrap
./configure
make
make install
./configure
make
make install
下载openssl,https://www.openssl.org/
./config
./Configure
make
make install
cms依赖apr
APR-Apache Portable Runtime Project. https://apr.apache.org/download.cgi
./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.csdn.net/lishenluo/article/details/107864758?spm=1001.2014.3001.5502
|