Xcode 5 - 无法构建模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19401388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:58:07  来源:igfitidea点击:

Xcode 5 - Could not build module

xcode

提问by bandejapaisa

I've turned on the flag in my project 'Enable Modules (C and ObjectiveC)' and i get 1000+ errors:

我在我的项目“启用模块(C 和 ObjectiveC)”中打开了标志,我收到了 1000 多个错误:

'Could not build module 'Security' 'Could not build module 'Foundation'

'无法构建模块'安全''无法构建模块'基础'

etc. etc... for every framework included

等等等等......包括每个框架

Has anyone else experienced this problem?

有没有其他人遇到过这个问题?

回答by Muhammad Irfan

I had same problem with Social.h. Fixed this issue by following thislink..

我在 Social.h 上遇到了同样的问题。按照这个链接修复了这个问题..

EDIT: In case the link breaks in the future, I'm adding the solution quoted from the page

编辑:如果将来链接断开,我将添加从页面引用的解决方案

The real problem here is at Build settings in the session: Apple

LLVM 5.0 - language - Modules, we should set Enable Modules (C and

objective c) as NO

这里真正的问题是在会话中的构建设置:Apple

LLVM 5.0 - 语言 - 模块,我们应该设置启用模块(C 和

目标 c) 作为 NO

example

例子

回答by wootage

Just had the same problem.Here is what worked for me: go to Build settings -> Architecture -> Architectures and change the option to standard architecture ( armv7 , armv7s ).

刚刚遇到了同样的问题。这对我有用:转到 Build settings -> Architecture -> Architectures 并将选项更改为标准架构( armv7 , armv7s )。

Mine somehow was changed ( including 64 - bit )

我的不知何故被改变了(包括 64 位)

Hope it helps

希望能帮助到你

回答by MFAZ

Just for reference, I had this happen to me unexpectedly when I moved my project into another folder. Changing the location made xCode go bonkers looking for the files. As soon as I put the project folder back in its original location, all of the errors disappeared.

仅供参考,当我将项目移动到另一个文件夹时,我意外地发生了这种情况。更改位置使 xCode 疯狂地寻找文件。一旦我将项目文件夹放回其原始位置,所有错误都消失了。

回答by JSA986

Had an Issue with Parse Framework doing this this on a project.

在项目中执行此操作时 Parse Framework 存在问题。

In: Apple LLVM 8.0 - Language Modules

在:Apple LLVM 8.0 - 语言模块

I changed: Allow Non-modular includes in Framework Modulesfrom Noto YESand compiles fine

我改变了:允许框架模块中的非模块化包含并且编译正常

enter image description here

在此处输入图片说明

回答by Liz

If it is useful, none solution proposed here solved my problem "Could not find module Darwin" in Xcode 6.2. Finally I have decided to create a new project and copy my source files, but command line tools option disappear when I tried to create a new project. So, I have reinstalled Command Line Tools from Terminal with the next command "xcode-select --install". All was solved!

如果有用,这里提出的任何解决方案都没有解决我在 Xcode 6.2 中“找不到模块 Darwin”的问题。最后我决定创建一个新项目并复制我的源文件,但是当我尝试创建一个新项目时命令行工具选项消失了。因此,我使用下一个命令“xcode-select --install”从终端重新安装了命令行工具。一切都解决了!