2011-02-03 26 views
0

昨天我又開始了我的iPhone項目。我正在用Cocos2D/Box2d構建遊戲。但是當我嘗試構建項目時,我收到了數千個錯誤。我找不到什麼錯誤。清理完所有目標/清空緩存後的iPhone構建錯誤

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

我做的下一件事是創建一個乾淨的新項目。建設沒有問題。所以在編譯一次之後,我添加了自定義代碼,我的遊戲又重新開始了!沒有錯誤。

我在這個項目上工作了幾個小時沒有任何問題,但由於我做了一些更改,我需要清空緩存和清理目標。之後..是的,再次成千上萬的錯誤。

我添加的代碼/類沒有覆蓋任何庫,它只是自定義類。

任何人都可以指出我正確的方向嗎?我不知道是什麼導致了這個問題。

傑拉德

編輯:

有超過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' 

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

+3

對不起,我試着心靈感應來弄清楚錯誤信息是什麼,但我在山谷裏,所以信號非常糟糕。你能編輯這個問題讓我們知道編譯器錯誤嗎? – 2011-02-03 12:56:19

+0

=),問題是。我得到了40k +的錯誤,我的電腦變得瘋狂了。所以我必須強制停止xCode ..我的一個朋友編譯它,並且其中一個40k錯誤是: – Gerard 2011-02-03 13:13:41

回答

0

當你問一個問題,請,如果你想看到的答案,爲我們提供了cocos2d的版本,還你用什麼編譯器版本。 .. 等等。嗯,但是我想我知道什麼是問題。您可能忘記將新創建的自定義類的擴展名從「.m」更改爲「.mm」。