2016-07-18 3 views
0

저는 Cocos2d 및 Xcode (게임 개발 및 Mac뿐만 아니라 창과 Eclipse 사용자였습니다)에서 새롭습니다. 나는 programmer guide에서 coco2dx 홈페이지에서 일하고 있습니다. 나는 자식을 복제하고 코드를 실행하려고 시도하지만 libcocos2d iOS.a에서 컴파일 오류가 발생합니다. libcocos2d에 대한 라이브러리 경로와 "cocos2d.h를 찾을 수 없습니다"오류가 발생한 헤더 파일을 설정했습니다. 하지만 지금은 링커 오류에 문제가 있습니다. 나는 건축 오류가 있지만 물건은 없다는 것을 알아 내려고 시도했다. 현재 빌드 빌드를위한 빌드 설정은 디버그 할 때 예, 릴리스하지 않을 때, 아키텍처가 표준 64 비트 x86_64로 설정되어 있고 유효한 아키텍처가 -armv7, armv7s, i386, x86_64 및 arm64 인 경우입니다. 프로젝트 설정에서정의되지 않은 기호로 인해 cocos2dx 빌드가 실패합니다.

Undefined symbols for architecture x86_64: 
    "_OBJC_CLASS_$_CMMotionManager", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_OBJC_CLASS_$_EAGLContext", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCDirectorCaller-ios.o) 
    "_OBJC_CLASS_$_UIApplication", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCApplication-ios.o) 
     objc-class-ref in libcocos2d iOS.a(CCDirectorCaller-ios.o) 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_OBJC_CLASS_$_UIColor", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_OBJC_CLASS_$_UIDevice", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCApplication-ios.o) 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_OBJC_CLASS_$_UIFont", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_OBJC_CLASS_$_UIImage", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCImage-ios.o) 
    "_OBJC_CLASS_$_UIScreen", referenced from: 
     objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o) 
    "_UIApplicationDidBecomeActiveNotification", referenced from: 
     -[CCDirectorCaller init] in libcocos2d iOS.a(CCDirectorCaller-ios.o) 
    "_UIApplicationWillResignActiveNotification", referenced from: 
     -[CCDirectorCaller init] in libcocos2d iOS.a(CCDirectorCaller-ios.o) 
    "_UIGraphicsPopContext", referenced from: 
     cocos2d::Device::getTextureDataForText(char const*, cocos2d::FontDefinition const&, cocos2d::Device::TextAlign, int&, int&, bool&) in libcocos2d iOS.a(CCDevice-ios.o) 
    "_UIGraphicsPushContext", referenced from: 
     cocos2d::Device::getTextureDataForText(char const*, cocos2d::FontDefinition const&, cocos2d::Device::TextAlign, int&, int&, bool&) in libcocos2d iOS.a(CCDevice-ios.o) 
    "_UIImageJPEGRepresentation", referenced from: 
     cocos2d::Image::saveToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libcocos2d iOS.a(CCImage-ios.o) 
    "_UIImagePNGRepresentation", referenced from: 
     cocos2d::Image::saveToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libcocos2d iOS.a(CCImage-ios.o) 
    "AppDelegate::AppDelegate()", referenced from: 
     _main in main.o 
    "AppDelegate::~AppDelegate()", referenced from: 
     _main in main.o 
    "_glBindVertexArrayOES", referenced from: 
     cocos2d::GL::bindVAO(unsigned int) in libcocos2d iOS.a(ccGLStateCache.o) 
    "_glDeleteVertexArraysOES", referenced from: 
     cocos2d::Renderer::~Renderer() in libcocos2d iOS.a(CCRenderer.o) 
     cocos2d::MeshCommand::releaseVAO() in libcocos2d iOS.a(CCMeshCommand.o) 
     cocos2d::TextureAtlas::~TextureAtlas() in libcocos2d iOS.a(CCTextureAtlas.o) 
     cocos2d::CameraBackgroundSkyBoxBrush::~CameraBackgroundSkyBoxBrush() in libcocos2d iOS.a(CCCameraBackgroundBrush.o) 
     cocos2d::CameraBackgroundSkyBoxBrush::initBuffer() in libcocos2d iOS.a(CCCameraBackgroundBrush.o) 
     cocos2d::Physics3DDebugDrawer::~Physics3DDebugDrawer() in libcocos2d iOS.a(CCPhysics3DDebugDrawer.o) 
     cocos2d::DrawNode::~DrawNode() in libcocos2d iOS.a(CCDrawNode.o) 
    ... 
    "_glGenVertexArraysOES", referenced from: 
     cocos2d::Renderer::setupVBOAndVAO() in libcocos2d iOS.a(CCRenderer.o) 
     cocos2d::MeshCommand::buildVAO() in libcocos2d iOS.a(CCMeshCommand.o) 
     cocos2d::TextureAtlas::setupVBOandVAO() in libcocos2d iOS.a(CCTextureAtlas.o) 
     cocos2d::CameraBackgroundSkyBoxBrush::initBuffer() in libcocos2d iOS.a(CCCameraBackgroundBrush.o) 
     cocos2d::Physics3DDebugDrawer::init() in libcocos2d iOS.a(CCPhysics3DDebugDrawer.o) 
     cocos2d::DrawNode::init() in libcocos2d iOS.a(CCDrawNode.o) 
     cocos2d::VertexAttribBinding::init(cocos2d::MeshIndexData*, cocos2d::GLProgramState*) in libcocos2d iOS.a(CCVertexAttribBinding.o) 
    ... 
    "_glMapBufferOES", referenced from: 
     cocos2d::Renderer::drawBatchedTriangles() in libcocos2d iOS.a(CCRenderer.o) 
     cocos2d::TextureAtlas::drawNumberOfQuads(long, long) in libcocos2d iOS.a(CCTextureAtlas.o) 
    "_glUnmapBufferOES", referenced from: 
     cocos2d::Renderer::drawBatchedTriangles() in libcocos2d iOS.a(CCRenderer.o) 
     cocos2d::TextureAtlas::drawNumberOfQuads(long, long) in libcocos2d iOS.a(CCTextureAtlas.o) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

답변

1

, 추가 OpenGLES.framework, UIKit.framework, ImageIO.framework, Foundation.framework 및 CoreGraphics.framework

'바이너리를 라이브러리와 연결' '단계를 구축'과 갈

프로젝트를 지우고 다시 실행하십시오.