错误信息:
ld: warning: in /Users/koupoo/koupoo/BoardEditor/MobileCoreServices.framework/MobileCoreServices, missing required architecture i386 in file
Undefined symbols:
"_kUTTagClassMIMEType", referenced from:
_kUTTagClassMIMEType$non_lazy_ptr in ASIHTTPRequest.o
(maybe you meant: _kUTTagClassMIMEType$non_lazy_ptr)
"_kUTTagClassFilenameExtension", referenced from:
_kUTTagClassFilenameExtension$non_lazy_ptr in ASIHTTPRequest.o
(maybe you meant: _kUTTagClassFilenameExtension$non_lazy_ptr)
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_UTTypeCopyPreferredTagWithClass", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
产生类似错误的原因和具体的解决办法:
This happens when you add a framework to your project and unintentionally copy the framework into your project directory.
The fix is to check your project directory (where you store your project on disk) for any iphone SDK *.Framework files and delete them.
Project will build fine afterwards.
本文解决了一个常见的iOS开发问题,即在项目中加入MobileCoreServices框架后出现的链接错误。错误主要源于框架被无意中复制到项目目录中,导致编译时架构缺失。文章提供了检查并删除项目目录中不合适的框架文件的具体步骤。

被折叠的 条评论
为什么被折叠?



