2010-09-29 7 views
-1

D'après ce que je peux dire, cela n'a jamais été demandé auparavant. Je construis une bibliothèque statique de cacao et je vais bien jusqu'à hier, juste après avoir vérifié le projet dans SVN, il ne se construit plus et j'ai 36 erreurs dans mon PCH. Tout cela est mon PCH est, et je l'ai trouvé aucun problème avec lui dans le passé:XCode PCH Errors

// 
// Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project. 
// 

#ifdef __OBJC__ 
    #import <Foundation/Foundation.h> 
#endif 

Et je reçois ces erreurs:

Build MYPROJECT of project MYPROJECT with configuration Release 
ProcessPCH /var/folders/rQ/rQtcY0wvHECcTKEGF6D4hk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MYPROJECTPrefix-agsnbtjqunzmxwghwaudmojjbbgk/MYPROJECT_Prefix.pch.gch MYPROJECT_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2 
cd /Users/rross/Documents/MYPROJECT 
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/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/rross/Documents/MYPROJECT-iOS/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/-generated-files.hmap -I/Users/rross/Documents/MYPROJECT/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/-own-target-headers.hmap -I/Users/rross/Documents/MYPROJECT/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/-all-target-headers.hmap -iquote /Users/rross/Documents/MYPROJECT/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/-project-headers.hmap -F/Users/rross/Documents/MYPROJECT/build/Release-iphonesimulator -I/Users/rross/Documents/MYPROJECT/build/Release-iphonesimulator/include -I/Users/rross/Documents/MYPROJECT/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/DerivedSources/i386 -I/Users/rross/Documents/MYPROJECT/build/MYPROJECT.build/Release-iphonesimulator/MYPROJECT.build/DerivedSources -c /Users/rross/Documents/MYPROJECT/_Prefix.pch -o /var/folders/rQ/rQtcY0wvHECcTKEGF6D4hk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/_Prefix-agsnbtjqunzmxwghwaudmojjbbgk/_Prefix.pch.gch 

In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:9, 
       from /Users/rross/Documents/MYPROJECT/src/ross/util/../ui/Comparable.h:9, 
       from /Users/rross/Documents/MYPROJECT/src/ross/datatype/Time.h:11, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:26, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6, 
       from /Users/rross/Documents/MYPROJECT/_Prefix.pch:6: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:16: error: cannot find interface declaration for 'NSObject', superclass of 'UIAcceleration' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:18: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:22: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:29: error: cannot find interface declaration for 'NSObject', superclass of 'UIAccelerometer' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:31: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:41: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:46: error: cannot find protocol declaration for 'NSObject' 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:14, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /Users/rross/Documents/MYPROJECT/src/ross/util/../ui/Comparable.h:9, 
       from /Users/rross/Documents/MYPROJECT/src/ross/datatype/Time.h:11, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:26, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6, 
       from /Users/rross/Documents/MYPROJECT/_Prefix.pch:6: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityElement.h:22: error: cannot find interface declaration for 'NSObject', superclass of 'UIAccessibilityElement' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityElement.h:31: error: expected specifier-qualifier-list before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityElement.h:32: error: expected specifier-qualifier-list before 'NSString' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityElement.h:33: error: expected specifier-qualifier-list before 'NSString' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityElement.h:34: error: expected specifier-qualifier-list before 'NSString' 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:10, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:9, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:10, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:12, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:15, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /Users/rross/Documents/MYPROJECT/src/ross/util/../ui/Comparable.h:9, 
       from /Users/rross/Documents/MYPROJECT/src/ross/datatype/Time.h:11, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:26, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6, 
       from /Users/rross/Documents/MYPROJECT/_Prefix.pch:6: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:41: error: cannot find interface declaration for 'NSObject', superclass of 'UIEvent' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:43: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:49: error: expected specifier-qualifier-list before 'NSTimeInterval' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:51: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:52: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:53: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h:54: error: expected ')' before 'NSSet' 
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:9, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:10, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:12, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:15, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /Users/rross/Documents/MYPROJECT/src/ross/util/../ui/Comparable.h:9, 
       from /Users/rross/Documents/MYPROJECT/src/ross/datatype/Time.h:11, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:26, 
       from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6, 
       from /Users/rross/Documents/MYPROJECT/_Prefix.pch:6: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:12: error: cannot find interface declaration for 'NSObject', superclass of 'UIResponder' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:18: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:19: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:21: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:22: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:24: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:31: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:32: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:33: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:34: error: expected ')' before 'NSSet' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:42: error: expected ')' before 'BOOL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:42: error: expected ')' before 'SEL' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:43: error: expected specifier-qualifier-list before 'NSUndoManager' 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:49: error: cannot find interface declaration for 'NSObject' 

choses Couple:

  1. I Je n'utilise pas les frameworks UIKit, alors pourquoi y a-t-il des erreurs liées à uikit?

  2. Désolé pour le courrier indésirable MYPROJECT, mais le projet est confidentiel en ce moment.

Merci à tous à l'avance

Répondre

3

Essayez cela, aide peut-être

#import <Availability.h> 

#ifdef __OBJC__ 
    #import <Foundation/Foundation.h> 
    #import <UIKit/UIKit.h> 
#endif 

Je vous conseille aussi de faire tous les trucs possibles du projet de nettoyage et en vous assurant que vous avez sélectionné un bon/existant SDK.

+0

J'ai nettoyé le projet, mais je ne peux pas utiliser 'UIKit' du tout, donc ça ne marchera pas. J'essaye de faire une bibliothèque qui compilera pour Mac OS et iOS. –

+0

Si vous ajoutez UIKit, ça marche? Dans ce cas, utilisez juste #if (TARGET_OS_IPHONE | TARGET_IPHONE_SIMULATOR) avant l'importation UIKit – Bitgamma

+0

Je l'ai résolu, Dans un de mes en-têtes de protocole, la première ligne par défaut est la suivante: '#import ' et je wasn ' t liant le cadre UIKit, merci! –

Questions connexes