【发布时间】:2015-06-05 01:02:07
【问题描述】:
在使用 Xcode 6 构建适用于 iOS 的 Poco C++ 应用程序时,其他人是否看到过这些链接器警告?
ld: warning: direct access in std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > const& Poco::Dynamic::Var::extract<std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > >() const to global weak symbol typeinfo for std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > const& Poco::Dynamic::Var::extract<std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > >() const to global weak symbol typeinfo for std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > const& Poco::Dynamic::Var::extract<std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > >() const to global weak symbol typeinfo for std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > const& Poco::Dynamic::Var::extract<std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > >() const to global weak symbol typeinfo for std::__1::vector<Poco::Dynamic::Var, std::__1::allocator<Poco::Dynamic::Var> > means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
如果是这样,您是否确定了它们的原因以及如何解决它们?
编辑:基于此主题的其他线程,我已验证所有项目(包括 Poco)的“默认隐藏符号”设置为 YES。
谢谢。
【问题讨论】:
-
这是错误还是警告?
标签: c++ ios xcode poco-libraries