protobuf交叉编译出错 descriptor

编程入门 行业动态 更新时间:2024-10-13 12:24:15

<a href=https://www.elefans.com/category/jswz/34/1771355.html style=protobuf交叉编译出错 descriptor"/>

protobuf交叉编译出错 descriptor

1:使用

$./configure --prefix=/usr/local/protobuf --host=arm-

./configure --host=arm-oe-linux-gnueabi --prefix=/home/ubuntu16/Desktop/work/protobuf/c++_protoc/3.4_build_result/arm/ --with-protoc=protoc
 

$ make

$ make check  //有可能出错,不用管

$ make install

 

交叉编译protobuf,出现以下错误:

libtool: warning: library '/home/ubuntu16/Desktop/work/ql-ol-sdk/ql-ol-crosstool/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/../../armv7a-vfp-neon-oe-linux-gnueabi/usr/lib/libstdc++.la' was moved.
  CXXLD    protoc
./.libs/libprotoc.so: error: undefined reference to 'descriptor_table_google_2fprotobuf_2fdescriptor_2eproto'
./.libs/libprotoc.so: error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
collect2: error: ld returned 1 exit status

 

原因3.5.1之后的版本不支持,所以需要使用cmake编译

cmake cmake/ -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=ON

可以参考这个:

 

 

更多推荐

protobuf交叉编译出错 descriptor

本文发布于:2024-02-06 02:58:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1745589.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:protobuf   descriptor

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!