【问题标题】:Xcode v12.5 - Build error on opening SQlite DBXcode v12.5 - 打开 SQlite DB 时生成错误
【发布时间】:2021-07-23 23:56:42
【问题描述】:

在将 Xcode 从 v12.4 升级到 12.5 后处理 React-Native 项目后,出现构建错误。曾经在 Xcode v12.4 中完美运行

我已缩小到导致此构建错误的行:

var db: OpaquePointer?
let _path = path ?? "widgetdb.sqlite3";
sqlite3_open(_path, &db) <-- This is the culprit!

错误日志:

Undefined symbols for architecture x86_64:
  "Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
      generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in SQLiteDatabase.o

任何帮助将不胜感激! 谢谢!!

【问题讨论】:

    标签: ios react-native sqlite swift5 xcode12.5


    【解决方案1】:

    今天遇到类似的问题,但错误是与 Alamofire 相关的

    在我的情况下,我通过删除解决了它

    "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\""
    

    来自项目搜索路径中的 LIBRARY_SEARCH_PATHS

    【讨论】:

    • 非常感谢!在我的情况下也有效!
    • 您确定我们需要删除它吗?
    猜你喜欢
    • 2011-03-02
    • 2017-09-17
    • 2013-05-21
    • 1970-01-01
    • 1970-01-01
    • 2011-05-01
    • 1970-01-01
    • 2012-01-09
    • 1970-01-01
    相关资源
    最近更新 更多