简体   繁体   English

Qt错误:运行代码后,在qt中出现protobuf错误

[英]Qt Error: After running the code, getting protobuf error in qt

[libprotobuf FATAL ../SaarathyClient/external/google/protobuf/stubs/common.cc:78] This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.3.0).  Contact the program author for an update.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "/build/mir-O8_xaj/mir-0.26.3+16.04.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.3.0).  Contact the program author for an update.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "/build/mir-O8_xaj/mir-0.26.3+16.04.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)
The program has unexpectedly finished.

I am getting above the error, while running the code. 运行代码时,我遇到了错误。 To fix it i have performed some steps, which are- 为了解决这个问题,我已经执行了一些步骤,这些步骤是-

(SYSTEM REQUIERMENTS==os- Ubuntu 16.04 LTS,Qt creator-Application development-opensource-latest V4.5rc) (系统要求==操作系统-Ubuntu 16.04 LTS,Qt创建者-应用程序开发-开源最新V4.5rc)

  1. Installed protocol buffer V3.5.1 which was missing in my system. 安装了我的系统中缺少的协议缓冲区V3.5.1。
  2. updated Qt with new updates. 用新更新更新了Qt。
  3. After run the code, still i am getting the same error. 运行代码后,仍然出现相同的错误。

Open project.pro and replace as follows 打开project.pro并替换如下

LIB += -lprotobuf

with

LIBS += /usr/local/lib/libprotobuf.a

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM