rabbitmq客户端c++安装详细记录
2012-01-31 11:41
459 查看
c客户端环境安装
1. 下载 rabbitmq-c 源码包 http://hg.rabbitmq.com/rabbitmq-c/
2. 下载 rabbitmq-codegen 源码包 http://hg.rabbitmq.com/rabbitmq-codegen/
3. 将rabbitmq-codegen拷贝到rabbitmq-c的目录下,改名为codegen
4. macro `AM_PROG_LIBTOOL’ not found in library 解决方案
产生这个报错的原因有两种,一种是没有安装libtool,一种是安装了libtool但是aclocal和libtool未安装在同一文件夹下。
5. 执行 autoreconf -i
6. 安装python的json包或simplejson包
7. 修改configure文件,屏蔽python检查部分,大约在20174-20198行。里面有语法错误。这个主要是检查第三步的那两个python包有没有安装,如下注释掉即可。
#checkPython python #checkPython python2.6 #checkPython python2.5 #if test "$found_python" = "no" #then # { { echo "$as_me:$LINENO: error: could not find a python that can 'import simplejson'" >&5 #echo "$as_me: error: could not find a python that can 'import simplejson'" >&2;} # { (exit 1); exit 1; }; } #fi
8. 执行./configure
有的电脑会出现如下错误:
Cannot find install-sh, install.sh, or shtool in ac-aux
解决方法:
$ libtoolize --force
$ aclocal
$ autoheader
$ automake --force-missing --add-missing
$ autoconf
$ ./configure
9. 进入librabbitmq目录,修改Makefile,将PYTHON变量的内容改成自己用的版本,原来的是空,大约在150行
PYTHON = python2.6
10. make, make check, make install
11.安装成功后,查看readme里面的内容,有可执行的例子:
./examples/amqp_listen localhost 5672 amq.direct test
amqp_listen为监听程序
localhost : rabbitmq服务host 5672 : 服务开放端口
./examples/amqp_sendstring localhost 5672 amq.direct test "hello world"
amqp_sendstring为发送程序
转载请注明出处/article/1407283.html
c++客户端1. 必须先安装c客户端环境
2. 下载源码包 https://github.com/akalend/amqpcpp
3. 按README执行即可
4. 原版本编译后是.a文件,如果要改成.so文件需要自己修改makefile,步骤如下
a. 修改CFLAGS变量, 增加-fPIC -shared参数
b.LIBFILE = lib$(LIBNAME).so
c. 修改$(LIBFILE)的编译语句, 屏蔽原来的 $(AR) 命令, 改成 $(CXX) $(CPPFLAGS) -o $@ $(OBJECTS)
$(LIBFILE): $(OBJECTS) # $(AR) rcs $@ $(OBJECTS) $(CXX) $(CPPFLAGS) -o $@ $(OBJECTS)
5.make
6.copy the libamqpcpp.a to /usr/local/lib or other system library dir.
copy the libamqpcpp.so to /usr/local/lib or other system library dir.
7.export LD_LIBRARY_PATH=":/usr/local/lib"
转载请注明出处/article/1407283.html
相关文章推荐
- rabbitmq客户端c++安装详细记录
- linux下安装c++ rabbitmq客户端SimpleAmqpClient
- ubuntu下安装 gSOAP 用于C/C++开发web service服务端与客户端
- nagios 服务端与客户端监控安装与详细配置,各配置文件详解
- 【代码管理】GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流
- GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流
- 【菜鸟学编程系列】GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流
- win7下安装svn服务器端及客户端详细步骤-同一主机
- Ubuntu 9.10安装minigui1.6.10 GPL详细记录
- android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录
- android 最新 NDK r8 在window下开发环境搭建 安装配置与使用 详细图文讲解,完整实际配置过程记录(原创)
- RabbitMQ---安装、运行、java客户端连接
- GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流
- win7下安装svn服务器端及客户端详细步骤
- Ubuntu12.04下PyTorch详细安装记录
- 开源消息队列系统 rabbitmq-server 安装详细
- win7下安装svn服务器端及客户端详细步骤
- SVN服务器端、客户端安装以及集成到eclipse的详细步骤
- 新手福利:SVN服务器安装部署以及客户端详细使用教程!
- RabbitMQ安装记录(windows10)