簡體   English   中英

清除所有目標/清空緩存后,iPhone生成錯誤

[英]iPhone building errors after clean all targets / empty caches

昨天我再次開始從事我的iPhone項目。 我正在用Cocos2D / Box2d構建游戲。 但是,當我嘗試構建項目時,出現了成千上萬個錯誤。 我無法找出問題所在。

因此,我從Cocos2D模板創建了一個新項目,並僅添加了我的自定義代碼。 當我第一次嘗試構建時,再次充滿了錯誤。

我接下來要做的就是創建一個干凈的新項目。 建築沒有問題。 因此,在編譯一次之后,我添加了自定義代碼,並且我的游戲再次正常運行! 沒有錯誤。

我在項目上工作了幾個小時,沒有任何問題,但是由於進行了一些更改,因此我需要清空Cache 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'

而這樣的例子不勝枚舉...

當您提出問題時,請提供所需的cocos2d版本以及您使用的編譯器版本...,依此類推。 嗯,不過我想我知道出了什么問題。 您可能只是忘了將新創建的自定義類的擴展名從“ .m”更改為“ .mm”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM