2017-10-03 5 views
0

기존의 cocos2d-x 프로젝트를 3.7에서 3.15로 업데이트하고 있습니다. 다음과 같은 링커 오류가 발생합니다 :cocos2d-x 3.15를 빌드 할 때 Apple Mach-O Linker 오류 : cocos2d :: FontAtlas :: conversionU32TOGB2312()에서 참조하는 "_iconv_open"

Undefined symbols for architecture arm64: 
    "_iconv_open", referenced from: 
     cocos2d::FontAtlas::conversionU32TOGB2312(std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > const&, std::__1::unordered_map<unsigned int, unsigned int, std::__1::hash<unsigned int>, std::__1::equal_to<unsigned int>, std::__1::allocator<std::__1::pair<unsigned int const, unsigned int> > >&) in libcocos2d iOS.a(CCFontAtlas.o) 
    "_iconv", referenced from: 
     cocos2d::FontAtlas::conversionU32TOGB2312(std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > const&, std::__1::unordered_map<unsigned int, unsigned int, std::__1::hash<unsigned int>, std::__1::equal_to<unsigned int>, std::__1::allocator<std::__1::pair<unsigned int const, unsigned int> > >&) in libcocos2d iOS.a(CCFontAtlas.o) 
    "_CTFramesetterCreateWithAttributedString", referenced from: 
     _calculateShrinkedSizeForString(NSAttributedString**, objc_object*, CGSize, bool, int&) in libcocos2d iOS.a(CCDevice-ios.o) 
    "_iconv_close", referenced from: 
     cocos2d::FontAtlas::~FontAtlas() in libcocos2d iOS.a(CCFontAtlas.o) 
    "_CTFramesetterSuggestFrameSizeWithConstraints", referenced from: 
     _calculateShrinkedSizeForString(NSAttributedString**, objc_object*, CGSize, bool, int&) in libcocos2d iOS.a(CCDevice-ios.o) 
ld: symbol(s) not found for architecture arm64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

이 문제를 해결하려면 어떻게해야합니까?

Xcode 9.0으로 작성

감사합니다!

답변

0

업데이트 :

탐색이 프로젝트 -하기> Phases-> 빌드 링크 바이너리와 라이브러리, 그리고 추가 : 약간의 추가 탐사를 통해, 나는 내 프로젝트에 두 개의 새로운 프레임 워크를 추가 할 필요가 있음을 발견

libiconv.tbd 
CoreText.framework 

내 링커 오류가 해결되었습니다.

다른 사람이 cocos2d-x의 이전 버전에서 업데이트하는 것과 유사한 문제가 발생할 경우를 대비하여 여기에 그대로 두십시오.

관련 문제