看错误内容:

/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::strings::StrCat[abi:cxx11](tensorflow::strings::AlphaNum const&)'

stackoverflow上一个友人的解释:

I suspect this is a C++ ABI issue. The ABI for std::string has changed in GCC  (related to C++ requirements, but it applies even if you aren't using C++11). See:
https://gcc.gnu.org/gcc-5/changes.html#libstdcxx If libprotobuf was built with GCC .x or prior, but your app is built with GCC , then you will see problems, because libprotobuf uses std::string in its interface. You have two options: .Rebuild libprotobuf with GCC (but now any apps built with GCC won't work with the new version of libprotobuf).
.Build you app with -D_GLIBCXX_USE_CXX11_ABI= as described at the above link. This will force GCC to use the old ABI version.

这个错误是在我把gcc4.8编的工程迁移到ubuntu16.04(gcc5.4)上编译时候发生的。这是C++ ABI一个错误,gcc4升gcc5时,std::string库接口做了迁移,而我工程中用了三方库tensorflow和protobuf,protobuf中用到了std::string。已经编好的tensorflow是用gcc4.8编的,gcc5上链接,接口对不上。两种解决方案:一种用gcc5重新编译三方库和工程,另一种就是在工程的编译选项(而不是链接选项)上加上-D_GLIBCXX_USE_CXX11_ABI=0参数,强制使用旧接口,问题解决。

更详细的解释可以参考:http://www.itkeyword.com/doc/8367047421581508x309/linking-problems-due-to-symbols-with-abicxx11

c++ - Linking problems due to symbols with abi::cxx11?的更多相关文章

  1. Xcode Build Setting Reference

    https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/ ...

  2. Extremely fast hash algorithm-xxHash

    xxHash - Extremely fast hash algorithm xxHash is an Extremely fast Hash algorithm, running at RAM sp ...

  3. Java多线程系列--“JUC集合”10之 ConcurrentLinkedQueue

    概要 本章对Java.util.concurrent包中的ConcurrentHashMap类进行详细的介绍.内容包括:ConcurrentLinkedQueue介绍ConcurrentLinkedQ ...

  4. [Artoolkit] Can I Use LGPL code for commercial application

    这是一个比较普遍但又容易被忽略的问题. From: http://answers.google.com/answers/threadview/id/439136.html 假设背景: - want t ...

  5. c malloc分配内存

    php中的内存分配有用类似emalloc这样的函数,emalloc实际上是C语言中的malloc的一层封装,php启动后,会向OS申请一块内存,可以理解为内存池,以后的php分配内存都是在这块内存池中 ...

  6. OPENVPN2.3配置文档官方说明

    openvpn Section: Maintenance Commands (8)Index NAME openvpn - secure IP tunnel daemon. SYNOPSIS open ...

  7. malloc.c

    glibc-2.14中的malloc.c源代码,供研究malloc和free实现使用: /* Malloc implementation for multiple threads without lo ...

  8. gcc6.3编译c++11的程序链接opencv时字符型函数未定义

    在Windows下编写图像处理程序,由于要使用regex,升级了mingw,编译c++11代码.之前代码中使用了opencv2.4.10,一直运行良好,升级编译器以后发现了错误:undefined r ...

  9. J.U.C并发框架源码阅读(十)ConcurrentLinkedQueue

    基于版本jdk1.7.0_80 java.util.concurrent.ConcurrentLinkedQueue 代码如下 /* * ORACLE PROPRIETARY/CONFIDENTIAL ...

随机推荐

  1. vs2008发布项目失败的解决方法

    解决办法: 要知道发布是怎么失败的,用组合键"Ctrl+Alt+O"即可,仔细查看信息可发现有没发布成功的详细提示,然后在资源管理器中找到那一项,删除或排除到项目外,重新生成之后再 ...

  2. springboot retry

    try/catch,while 循环或者定时任务  这样看起来 好  low sping boot  retry , 这样代码更简洁 eg: @Retryable(value= {RemoteAcce ...

  3. APP-8.1-百度语音应用

    1.百度语音登录地址 http://yuyin.baidu.com/ 2.控制台创建应用 3.生成签名 3.1Postman软件应用 APP-8.2-Postman应用 3.2Postman执行 UR ...

  4. Dictionary转为Model实例

    Dictionary<string, object> dic = new Dictionary<string, object>(); dic.Add(); dic.Add(&q ...

  5. sql server 2008 数据库可疑的解决步骤

    备份并新建同名数据库,并替换原数据文件 1 把问题数据库备份后直接删除 停掉SQLSERVER服务,把服务器上出问题的数据库, 假设名称为 test的数据库文件及日志文件备份到其他目录,然后直接将其删 ...

  6. RTS寻路相关资料收集

    http://www.cocoachina.com/game/20150824/13174.html RVO算法 RVO避开agent

  7. ORACLE表空间操作实例

    本文主要介绍oracle表空间常见的操作实例,包括创建.查询.增加.删除.修改.表空间和数据文件常用的数据字典和动态性能视图包括v$dbfile.v$datafile.v$tempfile.dba_s ...

  8. VBS处理AD帐号密码到期提醒的脚本[zt]

    原文:https://gallery.technet.microsoft.com/scriptcenter/f7f5f7ed-14ee-4d0e-81c2-7d95ce7e08f5 '======== ...

  9. LG Optimus L90 [D415] T-Mobile 刷机

    1 先使用[ROOT大师]ROOT手机. 2 执行以下ADB命令. adb shell su //备份 dd /by-name/laf of=/sdcard/laf.img. //清除 dd /by- ...

  10. Structs复习 Action

    引入jar包 web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version= ...