记录一下CommonAPI SomeIP Runtime在PC上编译及交叉编译情况。
一、下载
这里使用的是3.2.0版本。
https://github.com/COVESA/capicxx-someip-runtime
下载:
git clone https://github.com/COVESA/capicxx-someip-runtime.git
二、Ubuntu编译
1、安装依赖包
由于编译依赖于 vsomeip的库,所以再此之前要先编译vsomeip。
参考:https://blog.csdn.net/lang523493505/article/details/126413912
2、编译及安装
这里打算将编译出来的库放在上级目录下的target_pc目录。
在克隆下来的工程根目录创建文件夹build_dir,并且在里面创建编译脚本。
build.sh:
#!/bin/sh
#编译工具
COMPILER_CC=gcc
COMPILER_CXX=g++
#安装位置
COMPILER_PREFIX=$(pwd)/../../target_pc
#boost、commonapi-core、vsomeip3依赖库位置