gpt4 book ai didi

c++ - iOS:更新到 Xcode 8.3 后编译器中的 C++ 警告

转载 作者:可可西里 更新时间:2023-11-01 05:49:34 24 4
gpt4 key购买 nike

我上周更新到 Xcode 8.3。我似乎无法摆脱这个编译器警告:

ld: warning: direct access in function 'std::__1::basic_filebuf<char, std::__1::char_traits<char> >::open(char const*, unsigned int)' from file '/Path/To/Derived/Data/Xcode/DerivedData/myapp/Build/Intermediates/myapp.build/Debug-iphoneos/myapp.build/Objects-normal/arm64/myapp_lto.o' to global weak symbol 'std::__1::basic_filebuf<char, std::__1::char_traits<char> >::open(char const*, unsigned int)' from file '/Path/To/Derived/Data/Xcode/DerivedData/myapp/Build/Intermediates/myapp.build/Debug-iphoneos/myapp.build/Objects-normal/arm64/myapp_lto.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

我已尝试解决此警告:

  1. 正在更改 Symbols Hidden by Default是 - 在所有目标中
  2. 正在更改 Symbols Hidden by Default否 - 在所有目标中
  3. 基本上一切here (虽然不完全相关)
  4. 清理/删除派生数据/等
  5. 已添加 -fvisibility=hidden到我的目标,以及所有 cocoapod 目标。 ( described here )

非常感谢任何见解。提前致谢。

2017 年 4 月 10 日更新:

这似乎是 NewRelicAgent 产生的问题。从我的项目中删除 cocoapod 消除了警告。进一步研究。

最佳答案

New Relic 支持的回应:

We reviewed these warning messages with our Mobile Engineering team. They advised these warnings are related to a difference introduced in Xcode 8.3 - which isn't applied to the latest version of the New Relic iOS Agent built in Xcode 8.2.

They also stressed that these warnings don't appear to have any negative effects - but please let us know if you notice any other issues.

It's likely this issue will be resolved in the next release of the agent, when it will be built with Xcode 8.3.

关于c++ - iOS:更新到 Xcode 8.3 后编译器中的 C++ 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43330276/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com