英文:
Semantic Issue (Xcode): Mixing declarations and code is incompatible with standards before C99
问题
"Getting this error when trying to run the iOS Project from Flutter and Xcode. My Xcode version is 14.3."
英文:
Getting this error when trying to run the iOS Project from Flutter and Xcode. My Xcode version is 14.3
答案1
得分: 1
这个问题是由于Xcode版本升级至14.3导致的。可能是由于某些原因,编译器无法理解在处理Flutter项目时自动创建的Obj-c文件的语义。
解决此问题的一种方法是回退到Xcode 14.2,这样应该可以解决。也许你可以等待另一个Xcode更新,但目前我建议回退到14.2,因为目前在Apple论坛中也没有类似的解决方案。
英文:
This issue is happening due to Xcode version update to 14.3. May be for some reasons compiler is not understanding the semantics of Obj-c files which are created automatically while working on flutter project.
A workaround and swift solution to this problem is to revert to Xcode 14.2 and it will be working. May be you can also wait for another Xcode update but for now I will say to revert to 14.2 as currently no such solution is available at Apple Forums as well.
答案2
得分: 0
我没有深入研究这个问题,但有几个解决方法帮助我构建一个大型项目(Hammerspoon):
- 关闭“将警告视为错误”(也称为-Werror)
- 关闭“严格警告”(也称为-pedantic)
- 关闭“-Weverything”
- 或者添加“-Wno-error=declaration-after-statement”
仍然可能会因情况而异,但希望对您有所帮助。
英文:
I've not dug into this issue all that much, but a few workarounds that just helped me build a large project that was hitting this (Hammerspoon):
- turn off 'Treat Warnings as Errors' (aka -Werror)
- turn off 'Pedantic Warnings' (aka -pedantic)
- turn off '-Weverything'
- and/or add '-Wno-error=declaration-after-statement'
As always your milage may differ, but HTH.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论