Skip to content

Commit

Permalink
update build guide in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ifplusor committed Oct 5, 2019
1 parent 0afb218 commit c66fab1
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,47 @@ RocketMQ-Client-CPP is the C/C++ client of Apache RocketMQ, a distributed messag

## Build and Install

### CentOS

```bash
# intsall toolchain
yum install -y gcc gcc-c++ cmake

# install dependencies
yum install -y spdlog-devel libevent-devel jsoncpp-devel zlib-devel

# configure porject
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLibevent_USE_STATIC_LIBS=OFF -DJSONCPP_USE_STATIC_LIBS=OFF -DBUILD_ROCKETMQ_STATIC=OFF -DRUN_UNIT_TEST=OFF -DCMAKE_INSTALL_PREFIX=../bin ..

# build librocketmq.so
make rocketmq_shared -j 6

# build example: SyncProducer, PushConsumer, etc.
make SyncProducer
make PushConsumer
```

### macOS

```bash
# dependencies
brew install spdlog libevent jsoncpp zlib

# configure porject
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLibevent_USE_STATIC_LIBS=OFF -DJSONCPP_USE_STATIC_LIBS=OFF -DBUILD_ROCKETMQ_STATIC=OFF -DRUN_UNIT_TEST=OFF -DCMAKE_INSTALL_PREFIX=../bin ..

# build librocketmq.so
make rocketmq_shared -j 6

# build example: SyncProducer, PushConsumer, etc.
make SyncProducer
make PushConsumer
```

## Build and Install (Old SDK)

### Linux and Mac OS

**note**: make sure the following compile tools or libraries have been installed before running the build script **build.sh**.
Expand Down

0 comments on commit c66fab1

Please sign in to comment.