Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
193 views
in Technique[技术] by (71.8m points)

ios - Reference to 'X' is ambiguous

After several changes to my project I suddenly get this build error:

Reference to 'kCGImageAlphaPremultipliedLast' is ambiguous

Reference is ambiguous error screenshot

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

Xcode error screenshot

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

This happens in Xcode 5 using LLVM 5.1

Edit: 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 also didn't help. This error also appears when going back to a working commit.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

  • 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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...