Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的记忆中,当一个协议方法没有实现时,XCode 会产生一个编译错误,但现在只是显示一个“警告”。
这有什么变化吗?是关于 XCode 配置的吗?当(必需)协议的方法未实现时,我想抛出编译错误。
谢谢你。
您应该将“将警告视为错误”构建设置设置为Yes:
Yes
这也可以通过-Werror作为编译器参数传递来完成。
-Werror