工作目标的副本有 "OBJC_CLASS_" 个错误
copy of a working target has "OBJC_CLASS_" errors
我有一个 cocos2d 项目并且有两个目标 "free" 和 "pro"。
"free" 目标运行一切正常 - 所以我复制了它以将其变成 "pro" 但是这个复制的目标给出了很多“_OBJC_CLASS_”错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CCDirector", referenced from:
objc-class-ref in HelloWorldScene.o
objc-class-ref in RootViewController.o
objc-class-ref in CleverMouseAppDelegate.o
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
...
"_OBJC_CLASS_$_CCEaseBounceOut", referenced from:
objc-class-ref in MenuSence.o
"_OBJC_CLASS_$_CCLabelTTF", referenced from:
objc-class-ref in HelloWorldScene.o
"_OBJC_CLASS_$_CCLayer", referenced from:
_OBJC_CLASS_$_HelloWorld in HelloWorldScene.o
_OBJC_CLASS_$_LogoSence in LogoSence.o
_OBJC_CLASS_$_GameSence in GameSence.o
_OBJC_CLASS_$_MenuSence in MenuSence.o
_OBJC_CLASS_$_EndSence in EndSence.o
"_OBJC_CLASS_$_CCMenu", referenced from:
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCMenuItemImage", referenced from:
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCMoveBy", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCRepeatForever", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCScaleBy", referenced from:
objc-class-ref in MenuSence.o
"_OBJC_CLASS_$_CCScene", referenced from:
objc-class-ref in HelloWorldScene.o
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCSequence", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCSprite", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCTexture2D", referenced from:
objc-class-ref in CleverMouseAppDelegate.o
"_OBJC_CLASS_$_CCTextureCache", referenced from:
objc-class-ref in GameSence.o
"_OBJC_CLASS_$_CCTransitionFade", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_EAGLView", referenced from:
objc-class-ref in CleverMouseAppDelegate.o
"_OBJC_CLASS_$_SimpleAudioEngine", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in EndSence.o
"_OBJC_METACLASS_$_CCLayer", referenced from:
_OBJC_METACLASS_$_HelloWorld in HelloWorldScene.o
_OBJC_METACLASS_$_LogoSence in LogoSence.o
_OBJC_METACLASS_$_GameSence in GameSence.o
_OBJC_METACLASS_$_MenuSence in MenuSence.o
_OBJC_METACLASS_$_EndSence in EndSence.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
注意:我 "cocos2d libraries" 并且它的目标成员资格已为两个目标打开!
感谢 0xDEADBEEF - 在 post 中找到了答案:link
我将 "build active architecture" 设置为 "yes",所有错误都消失了!
谢谢 Akshay!
我有一个 cocos2d 项目并且有两个目标 "free" 和 "pro"。
"free" 目标运行一切正常 - 所以我复制了它以将其变成 "pro" 但是这个复制的目标给出了很多“_OBJC_CLASS_”错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CCDirector", referenced from:
objc-class-ref in HelloWorldScene.o
objc-class-ref in RootViewController.o
objc-class-ref in CleverMouseAppDelegate.o
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
...
"_OBJC_CLASS_$_CCEaseBounceOut", referenced from:
objc-class-ref in MenuSence.o
"_OBJC_CLASS_$_CCLabelTTF", referenced from:
objc-class-ref in HelloWorldScene.o
"_OBJC_CLASS_$_CCLayer", referenced from:
_OBJC_CLASS_$_HelloWorld in HelloWorldScene.o
_OBJC_CLASS_$_LogoSence in LogoSence.o
_OBJC_CLASS_$_GameSence in GameSence.o
_OBJC_CLASS_$_MenuSence in MenuSence.o
_OBJC_CLASS_$_EndSence in EndSence.o
"_OBJC_CLASS_$_CCMenu", referenced from:
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCMenuItemImage", referenced from:
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCMoveBy", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCRepeatForever", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCScaleBy", referenced from:
objc-class-ref in MenuSence.o
"_OBJC_CLASS_$_CCScene", referenced from:
objc-class-ref in HelloWorldScene.o
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCSequence", referenced from:
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCSprite", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_CCTexture2D", referenced from:
objc-class-ref in CleverMouseAppDelegate.o
"_OBJC_CLASS_$_CCTextureCache", referenced from:
objc-class-ref in GameSence.o
"_OBJC_CLASS_$_CCTransitionFade", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in MenuSence.o
objc-class-ref in EndSence.o
"_OBJC_CLASS_$_EAGLView", referenced from:
objc-class-ref in CleverMouseAppDelegate.o
"_OBJC_CLASS_$_SimpleAudioEngine", referenced from:
objc-class-ref in LogoSence.o
objc-class-ref in GameSence.o
objc-class-ref in EndSence.o
"_OBJC_METACLASS_$_CCLayer", referenced from:
_OBJC_METACLASS_$_HelloWorld in HelloWorldScene.o
_OBJC_METACLASS_$_LogoSence in LogoSence.o
_OBJC_METACLASS_$_GameSence in GameSence.o
_OBJC_METACLASS_$_MenuSence in MenuSence.o
_OBJC_METACLASS_$_EndSence in EndSence.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
注意:我 "cocos2d libraries" 并且它的目标成员资格已为两个目标打开!
感谢 0xDEADBEEF - 在 post 中找到了答案:link
我将 "build active architecture" 设置为 "yes",所有错误都消失了!
谢谢 Akshay!