FDBUS编译和使用

[复制链接]
 楼主| keer_zu 发表于 2022-9-16 17:52 | 显示全部楼层 |阅读模式
源码下载
  1. git clone https://gitee.com/jeremyczhen/fdbus.git
 楼主| keer_zu 发表于 2022-9-16 17:53 | 显示全部楼层
下载和编译protobuf
fdbus的序列化使用了protobuf。
  1. cd ~/workspace
  2. git clone https://github.com/protocolbuffers/protobuf.git
  3. cd protobuf
  4. git submodule update --init --recursive
  5. mkdir -p build/install
  6. cd build

  7. cmake -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=1 ../cmake
  8. make -j4 install
 楼主| keer_zu 发表于 2022-9-16 17:53 | 显示全部楼层
下载和编译fdbus
  1. cd ~/workspace
  2. git clone https://gitee.com/jeremyczhen/fdbus.git
  3. cd fdbus
  4. mkdir -p build/install
  5. cd build
  6. cmake -DCMAKE_INSTALL_PREFIX=install ../cmake
  7. make install
 楼主| keer_zu 发表于 2022-9-16 17:54 | 显示全部楼层
编译fdbus example
注意其中的路径,要改成自己的。
  1. cd ~/workspace/fdbus
  2. mkdir -p build-example/install
  3. cd build-example
  4. cmake -DSYSTEM_ROOT="~/workspace/protobuf/build/install;~/workspace/fdbus/build/install" -DCMAKE_INSTALL_PREFIX=install ../cmake/pb-example

  5. PATH=~/workspace/protobuf/build/install/bin:$PATH make install
 楼主| keer_zu 发表于 2022-9-16 17:55 | 显示全部楼层
运行fdbus实例
run name service
  1. cd ~/workspace/fdbus/build
  2. ./name_server


run test server
  1. cd ~/workspace/fdbus/build-example
  2. ./fdbservertest my_test



run test client
  1. cd ~/workspace/build-example
  2. ./fdbclienttest my_test



run log server
  1. cd ~/workspace/fdbus/build
  2. ./logsvc
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1478

主题

12914

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部

1478

主题

12914

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部