简体   繁体   中英

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)

  1. Installed protocol buffer V3.5.1 which was missing in my system.
  2. updated Qt with new updates.
  3. After run the code, still i am getting the same error.

Open project.pro and replace as follows

LIB += -lprotobuf

with

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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