清除所有目标/空缓存后,iPhone构建错误

时间:2011-02-03 12:48:36

标签: iphone xcode caching cocos2d-iphone compiler-errors

昨天我又开始研究我的iPhone项目了。我正在用Cocos2D / Box2d构建一款游戏。但是当我尝试构建项目时,我遇到了成千上万的错误。我无法找出问题所在。

所以我从Cocos2D模板创建了一个新项目,只添加了我的自定义代码。当我第一次尝试构建时再次出现错误。

我接下来要做的就是创建一个干净的新项目。没有问题的建筑物。所以在编译一次后,我添加了我的自定义代码,我的游戏再次运行!没有错误。

我在这个项目上工作了几个小时没有任何问题,但由于我做了一些改动,我需要清空Caches en Clean目标。在那之后..是的,再次成千上万的错误。

我添加的代码/类没有覆盖任何库,它只是自定义类。

任何可以指引我正确方向的人?我不知道是什么导致了这个问题。

杰拉德

编辑:

有超过40.000个错误。以下是一些错误。他们似乎都从“期待”开始。

    Build cocos2d libraries of project Untitled with configuration Debug CompileC "/Developer/Build Folder/Untitled.build/Debug-iphoneos/cocos2d libraries.build/Objects-normal/armv6/FontLabel.o" libs/FontLabel/FontLabel.m normal armv6 objective-c com.apple.compilers.llvmgcc42
cd /Users/m0rph3v5/Desktop/Untitled
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -DCOCOS2D_DEBUG=1 -DCD_DEBUG=1 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -gdwarf-2 -mno-thumb -miphoneos-version-min=3.0 "-I/Developer/Build Folder/Untitled.build/Debug-iphoneos/cocos2d libraries.build/cocos2d libraries.hmap" "-F/Developer/Build Folder/Debug-iphoneos" "-I/Developer/Build Folder/Debug-iphoneos/include" -Ilibs "-I/Developer/Build Folder/Untitled.build/Debug-iphoneos/cocos2d libraries.build/DerivedSources/armv6" "-I/Developer/Build Folder/Untitled.build/Debug-iphoneos/cocos2d libraries.build/DerivedSources" -fvisibility=hidden -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -c /Users/m0rph3v5/Desktop/Untitled/libs/FontLabel/FontLabel.m -o "/Developer/Build Folder/Untitled.build/Debug-iphoneos/cocos2d libraries.build/Objects-normal/armv6/FontLabel.o"

In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:9,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/cocos2d/ccTypes.h:35,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/cocos2d/CCAction.h:30,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/cocos2d/CCActionManager.h:28,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/cocos2d/cocos2d.h:51,
                 from /Users/m0rph3v5/Desktop/Untitled/Classes/Block.h:10,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:42,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/FontLabel/FontLabel.h:22,
                 from /Users/m0rph3v5/Desktop/Untitled/libs/FontLabel/FontLabel.m:22:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:91: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:92: error: expected ')' before 'allocator'
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:93: error: expected declaration specifiers or '...' before '*' token
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:93: error: 'CFStringRef' declared as function returning a function
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:94: error: expected declaration specifiers or '...' before '*' token
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:94: error: 'Boolean' declared as function returning a function
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:95: error: expected declaration specifiers or '...' before '*' token
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:95: error: 'CFHashCode' declared as function returning a function
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h:97: error: expected specifier-qualifier-list before 'CFIndex'

列表继续......

1 个答案:

答案 0 :(得分:0)

当你问一个问题时,如果你想看到答案,请提供cocos2d的版本以及你使用的编译器版本......等等。 嗯,但是我想我知道这是什么问题。您可能只是忘记将新创建的自定义类的扩展名从“.m”更改为“.mm”。