Kobold2d在将Xcode升级到4.6后生成错误

Kobold2d在将Xcode升级到4.6后生成错误,xcode,cocos2d-iphone,kobold2d,xcode4.6,Xcode,Cocos2d Iphone,Kobold2d,Xcode4.6,将我的Xcode升级到4.6后,Kobold2d 2.0.4生成如下错误。有人也遇到过这个问题吗 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 CompileC /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdg

将我的Xcode升级到4.6后,Kobold2d 2.0.4生成如下错误。有人也遇到过这个问题吗

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

CompileC /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/Objects-normal/armv7/CCAnimationExtensions.o kobold2d/cocos2d-ext/CCAnimationExtensions.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Werror -Wmissing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wstrict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG -DCOCOS2D_DEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -ffast-math -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=4.3 -I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/kobold2d-ios.hmap -I/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/libs/cocos2d-iphone/cocos2d -I/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/libs/GoogleAdMobAdsSDK -I/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/libs/cocos2d-iphone/external/kazmath/include -I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/DerivedSources/armv7 -I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/DerivedSources -F/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Products/Debug-iphoneos -include /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/PrecompiledHeaders/Prefix-iOS-bfbcgatlrctdcneqvloiipzyvdrz/Prefix-iOS.pch -MMD -MT dependencies -MF /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/Objects-normal/armv7/CCAnimationExtensions.d --serialize-diagnostics /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/Objects-normal/armv7/CCAnimationExtensions.dia -c /Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/kobold2d/cocos2d-ext/CCAnimationExtensions.m -o /Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.build/Debug-iphoneos/kobold2d-ios.build/Objects-normal/armv7/CCAnimationExtensions.o

/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/kobold2d/cocos2d-ext/CCAnimationExtensions.m:11:1: error: class 'FIXCATEGORYBUGCCAnimation' defined without specifying a base class [-Werror,-Wobjc-root-class]
FIX_CATEGORY_BUG(CCAnimation)
^
/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/kobold2d/cocos2d-ext/FixCategoryBug.h:15:43: note: expanded from macro 'FIX_CATEGORY_BUG'
#define FIX_CATEGORY_BUG(name) @interface FIXCATEGORYBUG ## name; @end @implementation FIXCATEGORYBUG ## name; @end
                                          ^
<scratch space>:5:1: note: expanded from macro 'FIXCATEGORYBUG'
FIXCATEGORYBUGCCAnimation
^
note: add a super class to fix this problem
1 error generated.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

/Users/ernnug/Kobold2D/Kobold2D-2.0.4/__Kobold2D__/<command line>:3:10: '/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D-brplvdgzzqjavebyfesirygztebf/Build/Intermediates/PrecompiledHeaders/Prefix-iOS-gizjrgholmwiqtfonzxtvzvwrkxa/Prefix-iOS.pch' file not found
Command/Applications/Xcode.app/Contents/Developer/Toolchains/xcodefault.xctoolchain/usr/bin/clang失败,退出代码为1
CompileC/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/mediates/Kobold2D Libraries.Build/Debug iphoneos/Kobold2D ios.Build/Objects normal/armv7/CCAnimationExtensions.o Kobold2D ext/CCAnimationExtensions.m normal armv7 objective-c com.apple.compilers.llvm.clang.10.compiler
cd/Users/ernnug/Kobold2D/Kobold2D-2.0.4//uu Kobold2D__
setenv LANG en_US.US-ASCII
setenv PATH“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/sbin:/sbin”
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-x objective-c-arch armv7-fmessage length=0-std=gnu99-Wno trigraphs-fpascal strings-O0-Werror-Wmissing字段初始值设定项-Wno缺少原型-Wreturn类型-Wno隐式原子属性-Wno接收器弱-Wformat-Wno缺少大括号-wParenthesses-Wswitch-Wno unused function-Wno unused label-Wno unused parameter-Wunused variable-Wno empty body-Wno uninitialized-Wno unknown pragmas-Wno shadow-Wno four char constants-Wno conversion-Wno int conversion-Wno enum conversion-Wsign compare-Wno-shorten-64-to-32-Wpointer sign-Wno新行eof-Wno选择器-Wstrict选择器匹配-Wundeclared选择器-Wno不推荐的实现-DDEBUG-DCOCOS2D_DEBUG=1-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk-ffast math-fstrict别名-Wprotocol-Wdeprecated声明-g-fvisibility=hidden-Wno符号转换-miphoneos version min=4.3-I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygrygztebf/Build/Intermediates/Kobold2D-Libraries.Build/Debug-iphoneos/Kobold2D-ios.Build/Kobold2D-ios.hmap-I/Users/ernnug/Kobold2D/Kobold2D-2.0.4//-I/Users/ernnug/Kobold2D/Kobold2D-2.0.4//uuuu-Kobold2D\uuuz/libs/googleedmobadsdk-I/Users/ernnug/Kobold2D/Kobold2D-2.0.4//uuuu-Kobold2D\uz/libs/cocoos2d-iphone/external/kazmath/include-I/Users/ernnug/Library/Developer/Xcode/derivedata/Kobold2D brplvdgzjavebyfregygzteff/Build/Products/Debug-iphoneos/include-I/Applications/Xcode.app/Contents/Developer/toolschains/XcodeDefault.xcodefault/usr/include-I/Applications/Xcode.app/toolschains/xcodefault.xcodefault.xctoolschain/usr/include-I/Applications/Xcode.app/Contents/Developer/toolschains/xcodefault.xcodefault.xct/usr/include-I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.Build/Debug-iphoneos/Kobold2D-ios.Build/DerivedSources/armv7-I/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries/Debug-iphoneos/Kobold2D-ios.Build/DerivedSources-F/Users/ernnug/Library/Developer/Xcode/derivedda/derivedda/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Products/Debug iphoneos-包括/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Intermediates/Prefix-iOS-bfbcgatlrctdcneqvloiipzyvdrz/Prefix-iOS.pch-MMD-MT dependencies-MF/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D Libraries.Build/Debug iphoneos/Kobold2D ios.Build/Objects normal/armv7/CCAnimationExtensions.d——序列化诊断/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Intermediates/Kobold2D-Libraries.Build/Debug-iphoneos/Kobold2D-ios.Build/Objects-normal/armv7/CCAnimationExtensions.dia-c/Users/ernnug/Kobold2D/Kobold2D-2.0.4/u Kobold2D\uu\uuuuu/Kobold2D/cocococococs2d extensions/ccanimationextens/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzzqjavebyfesirygztebf/Build/Intermediates/Kobold2D Libraries.Build/Debug iphoneos/Kobold2D ios.Build/Objects normal/armv7/CCAnimationExtensions.o
/Users/ernnug/Kobold2D/Kobold2D-2.0.4/_-Kobold2D__/Kobold2D/cocos2d ext/CCAnimationExtensions.m:11:1:错误:未指定基类[-Werror,-Wobjc根类]而定义了类“FixCategoryBugcanimation”
修复类别错误(C动画)
^
/Users/ernnug/Kobold2D/Kobold2D-2.0.4/_Kobold2D__/Kobold2D/cocos2d ext/FixCategoryBug.h:15:43:注意:从宏“修复类别错误”展开
#定义FIX_CATEGORY_BUG(名称)@interface FIXCATEGORYBUG##name@end@implementation FIXCATEGORYBUG##name@结束
^
:5:1:注意:从宏“FIXCATEGORYBUG”展开
固定类别Bugcanimation
^
注意:添加一个超级类来解决此问题
生成1个错误。
命令/Applications/Xcode.app/Contents/Developer/toolschains/xcodefault.xctoolschain/usr/bin/clang失败,退出代码为1
/Users/ernnug/Kobold2D/Kobold2D-2.0.4/uu-Kobold2D\uuuu/:3:10:“/Users/ernnug/Library/Developer/Xcode/DerivedData/Kobold2D brplvdgzqjavebyfesirygztebf/Build/Intermediates/Prefix-iOS-gizrgholmwiqtfonzvwrkxa/Prefix-iOS.pch”文件未找到

只需删除对FIXCATEGORYBUG的所有引用即可。不再需要它。

下面是我删除FixCategoryBug以更正此问题的文件摘要:

  • ccanimationextensions.m
  • CCDirectorExtensions.m
  • CCNodeExtensions.m
  • ccspritextensions.m
  • NSMutableArray+WeakReferences.m

如何删除对FIXCATEGORYBUG的所有引用?请转到CCAnimationsExtensions.m并删除#导入“FIXCATEGORYBUG.h”修复类别错误(CCAnimation)