iphone - 清除所有目标/清空缓存后,iPhone生成错误

标签 iphone xcode caching cocos2d-iphone compiler-errors

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

因此,我从Cocos2D模板创建了一个新项目,并仅添加了我的自定义代码。当我第一次尝试构建时,再次充满了错误。

我接下来要做的是创建一个干净的新项目。建筑没有问题。因此,在将其编译一次之后,我添加了自定义代码,并且我的游戏再次正常运行!没有错误。

我在项目上工作了几个小时,没有任何问题,但是由于进行了一些更改,我需要清空Caches 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”。

关于iphone - 清除所有目标/清空缓存后,iPhone生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4886336/

相关文章:

Xcode 运行脚本警告和错误消息被截断

ruby-on-rails - 带子域的 Rails 页面缓存

javascript - ASP.NET IIS 应用程序中的客户端脚本缓存

caching - 如何以编程方式保存网页?

iOS模拟器 View Controller 黑色背景Xcode 6.4

iphone - Bonjour 通过蓝牙无需 Gamekit ?

ios - 从消息弹出窗口导航到 RootViewController 时应用程序崩溃

iphone - UIView和UIImagView可以同时实现触摸事件吗?

ios - XCode应用程序加载器-错误ITMS-9000无效的配置文件

ios - "Export and reimport"xcode 项目