swift - 自生成新的 xcodeproj 文件以来,项目中架构 x86_64 的新未定义符号
问题描述
我最近xcodeproj
使用生成器工具(Xcode gen)为我的应用程序生成了一个新文件,我现在正在尝试编译该项目,但出现以下错误:
Undefined symbols for architecture x86_64:
"MyProject.Package.isValid.setter : Swift.Bool", referenced from:
key path setter for MyProject.Package.isValid : Swift.Bool : MyProject.Package in MultiplePlansViewModel.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
isValid
bool
是这样定义的:
private(set) lazy var isValid: Bool = paymentMethods.contains { $0.isValid }
奇怪的是,如果我将此代码更改为:
var isValid = false
然后项目编译。
任何想法为什么我现在收到此错误?设置新xcodeproj
文件时我可能会错过一些编译器标志吗?
解决方案
推荐阅读
- sql - 使用 Order By 计算分区中的行数
- celery - 监控 SQS+Celery
- node.js - Express JS Validator 函数错误器
- windows - 该命令以代码 2 Visual Studio 2017 退出
- c# - different ways to get TreeNode Count
- linux - 使用 Perl 从文件中读取特定列的值
- proxy - 更新 conda 时 ProxyAuthentication 失败
- r - 使用 dplyr 过滤分组数据集上的日期
- regex - 重定向而不保留 url 参数
- ruby-on-rails - 为什么我的 link_to image_tag 在 Rails 应用程序中出现语法错误?