对'X'的引用含糊不清 [英] Reference to 'X' is ambiguous

查看:93
本文介绍了对'X'的引用含糊不清的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对我的项目进行多次更改后,我突然遇到构建错误:

After several changes to my project i suddenly get the build error:

对'kCGImageAlphaPremultipliedLast'的引用不明确


和当看到错误时,它显示它被引用了4次

and when when taking a look at the error it shows me that it is referenced 4 times

有人可以告诉我这是怎么发生的,我怎样才能弄清楚是什么原因造成的?我没有明确地从CoreGraphics导入任何东西,我的Prefix文件只导入'Foundation.h'和一些自制的宏。然而,我导入了几个包含纯c代码的标题,但它们都封装在这样的内容中:

Can someone please tell me how this can happen and how can i figure out what is causing this? I am not importing anything from CoreGraphics explicitly and my Prefix file only imports ´Foundation.h´ and some self made macros. I am however importing several headers containing pure c code but they are all encapsulated in something like this:

#ifndef __MYCCODE_H
#define __MYCCODE_H
// imports here
// c code here
#endif

使用LLVM 5.1在xcode 5中发生这种情况

This happens in xcode 5 using LLVM 5.1

编辑:这似乎是这个项目的另一个问题。在评论这行代码后,我得到另一个错误:

this seems to be a different problem with this project. after commenting this line of code i get another error:

Malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/Xcode/DerivedData/ModuleCache/1NHZ5MC2OSMJV/CoreImage.pcm": module file out of date'

删除模块并再次添加它没有帮助。删除派生数据也没有帮助。返回工作提交时也会出现此错误

removing the module and adding it again did not help. deleting the derived data did also not help. this error also appears when going back to a working commit

推荐答案

创建新项目并将所有项目复制到此项目后,确定是成功但是我多次再次出现畸形或损坏的AST文件错误,但可以通过以下方式解决:

Ok after creating a new Project and coping everything to this project the build was successful however i got this "Malformed or corrupted AST file" error several times again but it can be solved by:


  • 清理项目

  • 删除'〜/ Library / Developer / Xcode / DerivedData / ModuleCache /'中的所有内容(组织者窗口内的按钮对我不起作用)

  • 再次清洁

  • 构建项目

  • Clean the project
  • Deleting everything inside '~/Library/Developer/Xcode/DerivedData/ModuleCache/' (the button inside the organizer window did not work for me)
  • Clean once more
  • Build project

之后它工作得很好,除了我有不时做这个修复

after that it works just fine except that i have to do this fix from time to time

我也对旧项目做了一个差异,似乎很多框架和其他旧东西都被困在那里测试东西所以如果你有这个检查你的项目设置文件的旧东西。

i also did a diff to the old project and it seems a lot of frameworks and other old stuff got stuck in there from testing things so in case you have this check your project settings file for old stuff.

我认为xcode和我有一天可以成为朋友。猜不是......

i thought that xcode and me can be friends one day. guess not...

这篇关于对'X'的引用含糊不清的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆