gearman的使用

本文详细介绍了在项目中编译Gearman并集成Boost库的过程,包括依赖库的准备、Boost编译参数设置、以及配置Gearman时如何正确引用Boost组件。通过实践示例,帮助开发者解决编译过程中的常见问题。

一、编译

1.1、依赖库

gperf libevent libuuid boost

1.2、boost编译

./b2 --build-dir=./build --with-program_options

1.3、gearman编译

在.bashrc中添加一行

export BOOST_ROOT=.../boost_1_58_0

./configure --prefix=/usr/local/gearman --with-boost-program-options=boost_program_options

或者无需export BOOST_ROOT直接

./configure --prefix=/usr/local/gearman --with-boost=no --with-boost-program-options=boost_program_options

但是,下面两个make的时候依然需要

ln -s .../boost_1_58_0/boost /usr/include/boost

ln -s .../boost_1_58_0/lib/libboost_program_options.so /usr/lib/libboost_program_options.so

make

sudo make install

转载于:https://www.cnblogs.com/summerwinter/p/4478489.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值