码迷,mamicode.com
首页 > 其他好文 > 详细

qt配置tensorflow 动态链接库运行错误

时间:2017-12-07 10:44:36      阅读:1469      评论:0      收藏:0      [点我收藏+]

标签:logs   fat   public   添加   files   download   elf   hive   sam   

使用qt配置自己编译的tensorflow,在.pro文件下添加如下配置:

INCLUDEPATH += /usr/local/opencv3/include /usr/local/include /home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/eigen_archive/Eigen \ #Eigen library;
/home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/eigen_archive /home/zy/.cache/bazel/_bazel_zy/69673882bdf22f44b89ee446a9525e4a/external/nsync/public /home/zy/Downloads/tensorflow-1.4.0/bazel-tensorflow-1.4.0 /home/zy/Downloads/tensorflow-1.4.0/bazel-genfiles

LIBS += -L/home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow -L/usr/local/opencv3/lib/ -L/usr/local/lib /usr/local/lib/libprotobuf.a /home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow/libtensorflow_cc.so /home/zy/Downloads/tensorflow-1.4.0/bazel-bin/tensorflow/libtensorflow_framework.so /usr/local/opencv3/lib/libopencv_core.so /usr/local/opencv3/lib/libopencv_highgui.so /usr/local/opencv3/lib/libopencv_imgproc.so /usr/local/opencv3/lib/libopencv_imgcodecs.so

运行包含tensorflow头文件的程序,出现如下错误:

[libprotobuf FATAL external/protobuf_archive/src/google/protobuf/stubs/common.cc:79] This program was compiled against version 2.6.1 of the Protocal Buffer runtime library, which is not compatible with the installed version(3.4.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 Protocal Buffers as your link-time library. (Version verification failed in "/build/mir-08_xaj/mir-0.26.3+16.044.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 Protocal Buffer runtime library, which is not compatible with the installed version (3.4.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 the Protocal Buffers as your link-time library. (Version verification failed in "/build/mir-08_xaj/mir-0.26.3+16.04.20170605/obj-x86_64-linux-gun/src/protobuf/mir_protobuf.pb.cc".)

问题分析

系统的protoc位置在/usr/local/bin, 使用protoc --version输出的版本号为:libprotoc 3.4.0.

qt配置tensorflow 动态链接库运行错误

标签:logs   fat   public   添加   files   download   elf   hive   sam   

原文地址:http://www.cnblogs.com/imagezy/p/7997611.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!