Ubuntu下编译mediapipe,C++

本文档记录了在编译MediaPipe时遇到的gcc版本和libstdc++.so.6版本不匹配的问题,以及如何通过升级gcc和参考相关博客解决这些问题。最终成功运行了helloworld和hand_tracking示例。

参考

MediaPipe的编译与测试_Linda Fan的博客-CSDN博客

重点是升级bazel和gcc

gcc升级之后,要把原来版本的一个地方删掉

参考:MediaPipe C++版手势识别环境搭建与编译_xiongfeng4152的博客-CSDN博客

出现了“4、gcc版本”的问题,参照上面这个博客

后来又出现了一个问题


bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc)

参考下面两个链接

解决/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found问题 - 简书

解决ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22‘ not found_AI_Frank的博客-CSDN博客

成功编译hello world

hello world

export GLOG_logtostderr=1
bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world

hand_tracking

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu
GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_cpu \
  --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live.pbtxt


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值