Nig*_*ury 12 linker mach-o objective-c asihttprequest ios4
我知道此类错误之前已多次提出,但我没有找到我的错误的解决方案.我正在使用xcode 4.0.我下载了ASIHTTPRequest zip和复制的classes文件夹以及两个'Reachability'文件.编译后,它给了我奇怪的错误,这是我无法弄清楚的.下面我为架构i386复制了未定义符号的错误文本.
Ld /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator/Manual.app/Manual normal i386
cd "/Users/svp/Desktop/Manual nav before pres 2"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator -F/Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator -filelist /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Intermediates/Manual_BeforePres2.build/Debug-iphonesimulator/Manual.build/Objects-normal/i386/Manual.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz -framework SystemConfiguration -framework CFNetwork -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator/Manual.app/Manual
Undefined symbols for architecture i386:
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_UTTypeCopyPreferredTagWithClass", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_kUTTagClassFilenameExtension", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_kUTTagClassMIMEType", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
它还在ASIAuthenticationDialog.m文件中给我一个警告:
ASIAuthenticationDialog may not respond to _presentingViewController
Run Code Online (Sandbox Code Playgroud)
请有人告诉我这些错误和警告是什么?我究竟做错了什么?我浪费了很多时间:(
编辑:
ASIAuthenticationDialog.m文件中的警告代码:
#import "ASIAuthenticationDialog.h"
#import "ASIHTTPRequest.h"
#pragma mark show / dismiss
+ (void)dismiss
{
if ([sharedDialog respondsToSelector:@selector(presentingViewController)])
[[sharedDialog presentingViewController] dismissModalViewControllerAnimated:YES];
else
[[sharedDialog parentViewController] dismissModalViewControllerAnimated:YES];
}
Run Code Online (Sandbox Code Playgroud)
Phi*_*lls 36
如果您要在文档中查找缺少的符号,您会发现它们与它们所在的框架一起列出.例如,UTTypeCreatePreferredIdentifierForTag它说它位于MobileCoreServices.framework中.(其他人也可能在那里;我没有找到所有这些.)将必要的框架添加到目标构建阶段的链接库步骤中,并且应该解析符号.
至于警告,请显示代码发生的位置.
| 归档时间: |
|
| 查看次数: |
12995 次 |
| 最近记录: |