cppMicroService 下载编译
Posted sshbit
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cppMicroService 下载编译相关的知识,希望对你有一定的参考价值。
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 下载编译的主要内容,如果未能解决你的问题,请参考以下文章