qt配置tensorflow 动态链接库运行错误
Posted 会飞的鱼鱼鱼
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了qt配置tensorflow 动态链接库运行错误相关的知识,希望对你有一定的参考价值。
使用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 动态链接库运行错误的主要内容,如果未能解决你的问题,请参考以下文章
Qt错误 —— 无法启动此程序 因为计算机丢失QtCore5.dll 以及 无法定位程序输入点于动态链接库QtCore5.dll
qt : debug版本正常,release版本总提示错误:无法定位程序输入点.......于动态链接库QtCore4.dll 上。