2010-09-10 35 views
9

Trong khi thực hiện thay đổi đối với ứng dụng iPhone tôi đã lưu và biên dịch; có các lỗi dưới đây ... undid tất cả mọi thứ và tôi bây giờ bị mắc kẹt với những lỗi này. Tôi đã thử làm sạch việc xây dựng, sao chép các tập tin ra khỏi thư mục này, đã thử xây dựng trên một máy khác. Không có gì tôi có thể nghĩ về giải quyết nó, sự thay đổi tôi đã thực hiện là tập tin .xib; Tôi đã xóa IBOutlet vì tôi không còn cần phần tử.Xcode biên dịch lỗi từ .pch? (iOS)

Có ai biết làm thế nào tôi có thể giải quyết những vấn đề này -> xin lỗi vì đầu ra gỡ lỗi dài nhưng nghĩ quá nhiều thông tin sẽ tốt hơn quá ít.

Build Hunter of project Hunter with configuration Debug 

ProcessPCH /var/folders/di/diNSUsegESCJmVpYf71u4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Hunter_Prefix-ewmgimmftydqkieofchvanjjzzvq/Hunter_Prefix.pch.pth Hunter_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler 
cd "/Users/stuartloxton/Documents/Hunter New" 
setenv LANG en_US.US-ASCII 
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/clang -x objective-c-header -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fvisibility=hidden -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote "/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-generated-files.hmap" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-own-target-headers.hmap" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-all-target-headers.hmap" -iquote "/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/Hunter-project-headers.hmap" "-F/Users/stuartloxton/Documents/Hunter New/build/Debug-iphonesimulator" "-F/Users/stuartloxton/Documents/Hunter New" "-I/Users/stuartloxton/Documents/Hunter New/build/Debug-iphonesimulator/include" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/DerivedSources/i386" "-I/Users/stuartloxton/Documents/Hunter New/build/Hunter.build/Debug-iphonesimulator/Hunter.build/DerivedSources" -c "/Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch" -o /var/folders/di/diNSUsegESCJmVpYf71u4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Hunter_Prefix-ewmgimmftydqkieofchvanjjzzvq/Hunter_Prefix.pch.pth 

In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIActivityIndicatorView.h:8: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:9: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:10: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:9: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:26: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60:23: error: expected function body after function declarator 
    CFDataRef metadata) CG_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0); 
        ^
In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIActivityIndicatorView.h:8: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:9: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:10: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:9: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:21:32: note: instantiated from: 
# define CG_AVAILABLE_STARTING __OSX_AVAILABLE_STARTING 
           ^
<scratch space>:82:1: note: instantiated from: 
__AVAILABILITY_INTERNAL__MAC_10_7 
^ 
In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIActivityIndicatorView.h:8: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:91: error: expected a type 
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); 
                         ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256:86: error: expected a type 
+ (void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); 
                        ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258:114: error: expected a type 
+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); // toView added to fromView.superview, fromView removed from its superview 
                               ^
In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:13: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187:31: error: unknown type name 'UIApplicationState' 
@property(nonatomic,readonly) UIApplicationState applicationState __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); 
          ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190:4: error: expected a type 
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); 
    ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191:28: error: expected a type 
- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); 
          ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202:45: error: expected a type 
- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); 
              ^
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206:4: error: expected a type 
- (UIRemoteNotificationType)enabledRemoteNotificationTypes __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); 
    ^
In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:73: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82:22: error: unknown type name 'UIDataDetectorTypes' 
@property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0); 
        ^
In file included from /Users/stuartloxton/Documents/Hunter New/Hunter_Prefix.pch:7: 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:79: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54:22: error: unknown type name 'UIDataDetectorTypes' 
@property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0); 
        ^
11 errors generated. 
+0

Xem này [post] (https: // devforums .apple.com/thread/66169? start = 25 & tstart = 0) trên diễn đàn ADC để giải quyết sự cố. – slangley

Trả lời

5

Tôi vừa gặp phải sự cố tương tự với iOS 4 SDK. Sau khi tôi thay đổi trình biên dịch từ trình biên dịch LLVM 1.5 thành LLVM GCC 4.2 hoặc GCC 4.2, mọi thứ đều được trả về OK.

Đây có phải là lỗi Clang không?

+0

Thay đổi trình biên dịch cũng được sửa cho tôi; có thể không thực sự phân loại nó như một lỗi Clang dù cho đến nay. Tôi đã không thể tái tạo nó ở bất cứ nơi nào khác. – stuartloxton

+0

Clang 1.5 không thực sự sẵn sàng cho C++. Dùng thử 3.0 (Xcode 4.2) – steipete

0

Nó có vẻ là một lỗi trong 4.1, vì vậy nếu bạn chưa cập nhật (chưa) để 4.2, thêm video này vào tập tin tiền tố của bạn:

#if TARGET_IPHONE_SIMULATOR 
#define __IPHONE_OS_VERSION_MIN_REQUIRED 040100 
#warning "Remove This in SDK 4.2, needed because of a bug in SDK 4.1" 
#endif