16001.WSL2 ubuntu20.04 编译安装 vsomeip

1 vsomeip 编译安装

1.1 vsomeip的安装

参考博文 https://blog.csdn.net/peterwanye/article/details/128386539

1.2 编译提示错误

ubuntu@1-BJ-EE1000042:~/opt/vsomeip-3.4.10/build$ cmake -DENABLE_MULTIPLE_ROUTING_MANAGERS=1 ..

Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': gnutls_handshake() failed: Error in the pull function.
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': gnutls_handshake() failed: Error in the pull function.
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': gnutls_handshake() failed: Error in the pull function.
-- Had to git clone more than once:
          3 times.
CMake Error at googletest-subbuild/googletest-populate-prefix/tmp/googletest-populate-gitclone.cmake:31 (message):
  Failed to clone repository: 'https://github.com/google/googletest.git'
  • 修改CMakeLists.txt 添加GTEST_ROOT 路径.
set(GTEST_ROOT "/home/ubuntu/opt/googletest-src")

if (NOT GTEST_ROOT)
    if (DEFINED ENV{GTEST_ROOT})
        set(GTEST_ROOT $ENV{GTEST_ROOT})
    else()
        include(FetchContent)
        FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0) 
        FetchContent_Populate(googletest)
        set(GTEST_ROOT ${googletest_SOURCE_DIR})
    endif()
endif()

1.3 编译hello_world示例

  • 在hello_world工程目录下,创建目录build,执行cmake .. 在进行make编译.
    在这里插入图片描述

1.4 运行服务器端

ubuntu@1-BJ-EE1000042:~/opt/vsomeip-3.4.10/examples/hello_world/build$ VSOMEIP_CONFIGURATION=../helloworld-local.json VSOMEIP_APPLICATION_NAME=hello_world_service ./hello_world_service

在这里插入图片描述

ubuntu@1-BJ-EE1000042:~/opt/vsomeip-3.4.10/examples/hello_world/build$ VSOMEIP_CONFIGURATION=../helloworld-local.json VSOMEIP_APPLICATION_NAME=hello_world_client ./hello_world_client

在这里插入图片描述

相关推荐

  1. Ubuntu】windows离线安装WSL2

    2024-07-20 02:02:02       50 阅读
  2. wsl安装ubuntu

    2024-07-20 02:02:02       37 阅读
  3. window wsl安装ubuntu

    2024-07-20 02:02:02       29 阅读
  4. WSL2笔记9】Ubuntu 环境ComfyUI 安装使用笔记

    2024-07-20 02:02:02       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-20 02:02:02       101 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-20 02:02:02       109 阅读
  3. 在Django里面运行非项目文件

    2024-07-20 02:02:02       87 阅读
  4. Python语言-面向对象

    2024-07-20 02:02:02       96 阅读

热门阅读

  1. 厨房秤方案pcba设计研发

    2024-07-20 02:02:02       19 阅读
  2. Jwt令牌

    2024-07-20 02:02:02       24 阅读
  3. php反序列化练习题

    2024-07-20 02:02:02       23 阅读
  4. Python代码执行顺序

    2024-07-20 02:02:02       16 阅读
  5. Linux C++ 063-设计模式之观察者模式

    2024-07-20 02:02:02       25 阅读
  6. 07.14_111期_linux_网络通信

    2024-07-20 02:02:02       25 阅读
  7. vue3 tab切换函数回调刷新跳转页面

    2024-07-20 02:02:02       20 阅读
  8. 贝叶斯算法理论

    2024-07-20 02:02:02       25 阅读
  9. 【无标题】

    2024-07-20 02:02:02       20 阅读