【问题标题】:Apple Mach-O Linker Error -- Undefined symbols for architecture arm64 [duplicate]Apple Mach-O 链接器错误——架构 arm64 的未定义符号 [重复]
【发布时间】:2017-09-14 02:34:57
【问题描述】:

每次我运行我的项目时都会遇到 Apple Mach-O 链接器错误,我正在尝试使用带有 iOS 10.0 的 iPhone 6s 进行构建。

架构的未定义符号arm64:

"boost::gregorian::greg_month::as_short_string() const", referenced from:
      boost::date_time::month_formatter<boost::gregorian::greg_month, boost::date_time::iso_format<char>, char>::format_month(boost::gregorian::greg_month const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libSHP.a(Timer.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

我使用的是 Xcode 8.1 版

【问题讨论】:

  • 尝试使用 CMD + Shift + k 清理您的项目。然后再试一次。
  • @ankit 不工作,我什至尝试删除派生数据并重新构建项目,但它不工作
  • 这可能会有所帮助:stackoverflow.com/questions/19213782/…
  • 确保使用的 boost 库是为 arm64 构建的。
  • @shallowThought 我该怎么做?

标签: c++ ios xcode linker


【解决方案1】:

如果你的ArchitecturesValid Architectures都没有问题,你可以检查你是否在Other Linker Flags中添加了$(inherited),如下所示.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-19
    相关资源
    最近更新 更多