编译rabbitmq c++客户端

rabbitmq官网地址html

rabbitmq客户端 c++版本地址c++

rabbitmq客户端 c版本地址git

 

下载c++版本:根据编译说明github

Pre-requisites

  • boost-1.47.0 or newer (uses chrono, system internally in addition to other header based libraries such as sharedptr and noncopyable)
  • rabbitmq-c you'll need version 0.5.1 or better.
  • cmake 2.8+ what is needed for the build system
  • Doxygen OPTIONAL only necessary to generate API documentation

因此1:去boost官网下载大于1.47.0的版本,我下的是boost_1_60_0.tar.bz2并编译安装bootstrap

    ./bootstrap.sh --prefix=/usr/local/boost-1.60.0ui

     sudo ./b2 install.net

     cp -rf /usr/local/boost-1.60.0/include/boost  /usr/includehtm

     cp -rf /usr/local/boost-1.60.0/lib /usr/lib blog

     export Boost_LIBRARY_DIRS=/usr/librabbitmq

     cmake .. (若是没有cmake,先安装yum install cmake)

     make 

     make install

  2:下载rabbitmq-c,并编译安装

              须要openssl,因此先安装ssl开发包:yum install openssl-devel (unbuntu系统貌似为:sudo apt-get install libssl-dev 个人为rhel6.0)

    LINUX系统通常事先会安装openssl的发行版(用 openssl version -a 命令就能够看到),可是仍是须要安装开发版本才行,不然会提示一大堆环境变量没法识别的错误:好比

    Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
    而后, 

     cmake .. (若是没有cmake,先安装yum install cmake)

     make 

     make install

 

如下是我编译好的c++版本的库文件    

相关文章
相关标签/搜索