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,使其只要有警告就不会构建?
treat warnings as errors = YES在构建设置中设置
treat warnings as errors = YES
您可以将-Werr开关添加到编译器标志(如果我没记错的话,在构建阶段选项卡上)。这将使编译器将所有警告都视为错误,并且每次警告都会阻塞。
-Werr