1、下载最新release版本release-3.4版本

 

https://github.com/CppMicroServices/CppMicroServices/tree/release-3.4

 

2、编译:

(1)修改顶层CMakeLists.txt ,打开生成共享库以及编译example编译选项

us_cache_var(BUILD_SHARED_LIBS ON BOOL "Build shared libraries")
us_cache_var(CMAKE_DEBUG_POSTFIX d STRING "Executable and library debug name postfix" ADVANCED)

us_cache_var(US_ENABLE_THREADING_SUPPORT ON BOOL "Enable threading support")
us_cache_var(US_ENABLE_TSAN OFF BOOL "Enable tsan (thread sanitizer)" ADVANCED)
us_cache_var(US_ENABLE_COVERAGE OFF BOOL "Enable code coverage" ADVANCED)
us_cache_var(US_BUILD_TESTING OFF BOOL "Build tests")
us_cache_var(US_BUILD_EXAMPLES ON BOOL "Build example projects")
us_cache_var(US_USE_SYSTEM_GTEST OFF BOOL "Build using an external GTest installation" ADVANCED)

(2)创建build文件夹并编译

mkdir build && cd build
cmake ..
make -j4 

(3)运行测试程序

  ./bin/usTutorialDriver (然而包一堆错,原因是软连接问题,根据错误添加共享库的软连接)

如报一下错误:

nvidia@ubuntu:~/share/CppMicroServices-release-3.4/build$ ./bin/usTutorialDriver 
Failed to install bundle library at /home/nvidia/share/CppMicroServices-release-3.4/build/lib/libdictionaryserviced.so: /home/nvidia/share/CppMicroServices-release-3.4/build/lib/libdictionaryserviced.so does not exist

则添加软链接:

nvidia@ubuntu:~/share/CppMicroServices-release-3.4/build/lib$ ln -s libdictionaryservice.so libdictionaryserviced.so 

3、运行

cppMicroService 下载编译

 

相关文章:

  • 2021-11-21
  • 2021-06-15
  • 2021-12-06
  • 2021-08-31
  • 2021-08-09
  • 2021-09-08
  • 2021-12-12
  • 2021-09-12
猜你喜欢
  • 2021-06-05
  • 2021-08-04
  • 2021-10-30
  • 2021-09-11
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案