- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我有这个遗留项目,我正试图将它带到 iOS 7 和 Xcode 5 中。这里所说的遗留,是指真正的遗留。就像 2004 年的遗产。
无论如何,我正在尝试构建这个东西,它吐出一些库,包括一些常见的第三方库。链接时,出现如下错误:
Undefined symbols for architecture ${arch}:
"google::protobuf::internal::WireFormatLite::WriteBytes(int, std::string const&, google::protobuf::io::CodedOutputStream*)"
在使用 nm
检查时,仍然包含在项目中的旧(仅限 arm)二进制库包含以下内容:
U __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS0_2io17CodedOutputStreamE
00000a8c T __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS0_2io17CodedOutputStreamE
00002b28 S __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS0_2io17CodedOutputStreamE.eh</code>
当我通过 Xcode 5(因此,clang/llvm)运行项目时创建的新库(通用)包含以下内容:
U __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKSsPNS0_2io17CodedOutputStreamE
00000514 T __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKSsPNS0_2io17CodedOutputStreamE
00000b2c S __ZN6google8protobuf8internal14WireFormatLite10WriteBytesEiRKSsPNS0_2io17CodedOutputStreamE.eh
对我来说,似乎在错位的名称中缺少参数。
这正常吗,我需要去别的地方看看吗?
或者如果这是问题所在:知道如何解决吗?
编辑:我混淆了旧的和新的。我没有改变原来的帖子
最佳答案
旧的,只有 ARM 的图书馆似乎表明:
google::protobuf::internal::WireFormatLite::WriteBytes(int, std::string const&, google::protobuf::io::CodedOutputStream*)
它具有使用 libstdc++ 编译的所有特征。
新的通用库表明:
google::protobuf::internal::WireFormatLite::WriteBytes(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)
这具有使用 libc++ 编译的所有特征
您的链接错误表明查找有问题:
google::protobuf::internal::WireFormatLite::WriteBytes(int, std::string const&, google::protobuf::io::CodedOutputStream*)
如果链接到库的代码是使用 libstdc++
编译的,并且因为您的新通用库是使用 libc++
编译的,代码将不会链接。
您必须使用相同的 libc++/libstdc++ 支持编译一切,您不能混合搭配,因为它们会拒绝链接。确保项目中的每个元素都是使用相同的 C++ 标准库编译的,并且应该解决链接错误。
通常,分解符号(使用 c++filt
)可以让您看到正确的签名,对于此代码,一旦您开始看到 std::__1::
在符号中,它表示该库是使用 libc++
编译的,当您看到链接失败时带有未修饰的 std::
符号(即没有内部 __1::
),那么它表明执行链接的项目正在使用 libstdc++
。
关于c++ - 无法将 C++ 与 Xcode 5 链接起来,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21740425/
我正在尝试执行 vagrant up 但一直遇到此错误: ==> default: IOError: [Errno 13] Permission denied: '/usr/local/lib/pyt
我在容器 div 中有一系列动态创建的不同高度的 div。 Varying text... Varying text... Varying text... Varying text.
通过 cygwin 运行 vagrant up 时遇到以下错误。 stderr: /bin/bash: /home/vagrant/.ansible/tmp/ansible-tmp-14872260
今天要向小伙伴们介绍的是一个能够快速地把数据制作成可视化、交互页面的 Python 框架:Streamlit,分分钟让你的数据动起来! 犹记得我在做机器学习和数据分析方面的毕设时,
我是 vagrant 的新手,正在尝试将第二个磁盘添加到我正在用 vagrant 制作的虚拟机中。 我想出了如何在第一次启动虚拟机时连接磁盘,但是当我关闭机器时 然后再次备份(使用 'vagrant
我是一名优秀的程序员,十分优秀!