DCloud - 5+SDK - iOS端基础集成

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bellazhouyi/article/details/84835070

第一步:查看官方文档5+SDK集成,多看两遍。
第二步:跟着官方文档,进行集成。
第三步:运行之后,有可能会出现linker错误,基本都是由于 某些依赖库没有添加完。

现总结如下:
出现Linker错误:

Undefined symbols for architecture x86_64:
…<中间省略>
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  • 添加StoreKit.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_SKStoreProductViewController”, referenced from:
objc-class-ref in liblibPDRCore.a(DCH5ScreenAdvertising.o)
“_SKStoreProductParameterITunesItemIdentifier”, referenced from:
-[DCH5ScreenAdvertising touchesEnded:withEvent:] in liblibPDRCore.a(DCH5ScreenAdvertising.o)

  • 添加 QuickLook.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_QLPreviewController”, referenced from:
objc-class-ref in liblibPDRCore.a(PGRuntime.o)

  • 添加libc++.tbd(xcode10之前是libstdc++.tdb)

Undefined symbols for architecture x86_64:
“vtable for __cxxabiv1::__class_type_info”, referenced from:
typeinfo for tinyxml2::XMLNode in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLVisitor in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLAttribute in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::MemPool in liblibPDRCore.a(tinyxml2.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
“vtable for __cxxabiv1::__si_class_type_info”, referenced from:
typeinfo for tinyxml2::XMLText in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLPrinter in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLComment in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLDeclaration in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLUnknown in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLElement in liblibPDRCore.a(tinyxml2.o)
typeinfo for tinyxml2::XMLDocument in liblibPDRCore.a(tinyxml2.o)

NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
“___cxa_pure_virtual”, referenced from:
vtable for tinyxml2::XMLNode in liblibPDRCore.a(tinyxml2.o)
“___cxa_begin_catch”, referenced from:
___clang_call_terminate in liblibPDRCore.a(tinyxml2.o)
“operator new[](unsigned long)”, referenced from:
tinyxml2::StrPair::SetStr(char const*, int) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::SetError(tinyxml2::XMLError, int, char const*, …) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::LoadFile(__sFILE*) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::Parse(char const*, unsigned long) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::DynArray<char, 20>::EnsureCapacity(int) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::DynArray<tinyxml2::XMLNode*, 10>::EnsureCapacity(int) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::DynArray<tinyxml2::MemPoolT<80>::Block*, 10>::EnsureCapacity(int) in liblibPDRCore.a(tinyxml2.o)

“operator new(unsigned long)”, referenced from:
-[PDRCoreUpdateParse parse:] in liblibPDRCore.a(UpdateFileParse.o)
-[PDRIDERefreshParse initWithPath:] in liblibPDRCore.a(HbuilderSyncFileParse.o)
-[PGNRTXMLParse initParseWithDomString:defaultStyle:] in liblibPDRCore.a(PGNRTXMLParse.o)
tinyxml2::MemPoolT<80>::Alloc() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::MemPoolT<120>::Alloc() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::MemPoolT<112>::Alloc() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::MemPoolT<104>::Alloc() in liblibPDRCore.a(tinyxml2.o)

“std::terminate()”, referenced from:
___clang_call_terminate in liblibPDRCore.a(tinyxml2.o)
“operator delete”, referenced from:
tinyxml2::StrPair::Reset() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::SetError(tinyxml2::XMLError, int, char const*, …) in liblibPDRCore.a(tinyxml2.o)
tinyxml2::DynArray<tinyxml2::XMLNode*, 10>::~DynArray() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::~XMLDocument() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDocument::Clear() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLPrinter::XMLPrinter(__sFILE*, bool, int) in liblibPDRCore.a(tinyxml2.o)

“operator delete(void*)”, referenced from:
-[PDRCoreUpdateParse parse:] in liblibPDRCore.a(UpdateFileParse.o)
-[PDRIDERefreshParse initWithPath:] in liblibPDRCore.a(HbuilderSyncFileParse.o)
-[PGNRTXMLParse initParseWithDomString:defaultStyle:] in liblibPDRCore.a(PGNRTXMLParse.o)
tinyxml2::XMLComment::~XMLComment() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLDeclaration::~XMLDeclaration() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLUnknown::~XMLUnknown() in liblibPDRCore.a(tinyxml2.o)
tinyxml2::XMLElement::~XMLElement() in liblibPDRCore.a(tinyxml2.o)

“___gxx_personality_v0”, referenced from:
-[PGNativeContentView typeset:isWrapContent:] in liblibPDRCore.a(PGNativeContentView.o)
-[PGNativeContentView getTouchControl:touchPoint:] in liblibPDRCore.a(PGNativeContentView.o)
-[PDRCoreUpdateParse parse:] in liblibPDRCore.a(UpdateFileParse.o)
-[PDRIDERefreshParse initWithPath:] in liblibPDRCore.a(HbuilderSyncFileParse.o)
+[PTDeviceInfo deviceInfo] in liblibPDRCore.a(PDRToolSystemEx.o)
+[PTDevice sharedDevice] in liblibPDRCore.a(PDRToolSystemEx.o)
+[PGDeviceStatusJSBuilder sharedJSBulider] in liblibPDRCore.a(PGDeviceStatus.o)

  • 添加AddressBook.framework

Undefined symbols for architecture x86_64:
“_ABAddressBookGetAuthorizationStatus”, referenced from:
-[PGNavigator checkContactsPermission] in liblibNavigator.a(PGNavigator.o)

  • 添加AVFoundation.framework

Undefined symbols for architecture x86_64:
OBJC_CLASSKaTeX parse error: Expected group after '_' at position 107: … "_OBJC_CLASS_̲_AVCaptureDevice”, referenced from:
objc-class-ref in liblibNavigator.a(PGNavigator.o)
“_AVMediaTypeVideo”, referenced from:
-[PGNavigator checkCameraPermission] in liblibNavigator.a(PGNavigator.o)

  • 添加StoreKit.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_SKStoreProductViewController”, referenced from:
objc-class-ref in liblibPDRCore.a(DCH5ScreenAdvertising.o)
“_SKStoreProductParameterITunesItemIdentifier”, referenced from:
-[DCH5ScreenAdvertising touchesEnded:withEvent:] in liblibPDRCore.a(DCH5ScreenAdvertising.o)

  • 添加CoreLocation.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_CLLocationManager”, referenced from:
objc-class-ref in liblibNavigator.a(PGNavigator.o)

  • 添加AssetsLibrary.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_ALAssetsLibrary”, referenced from:
objc-class-ref in liblibNavigator.a(PGNavigator.o)

  • 添加JavaScriptCore.framework

Undefined symbols for architecture x86_64:
OBJC_CLASS$_JSContext”, referenced from:
objc-class-ref in liblibPDRCore.a(H5WEUIWebview.o)

猜你喜欢

转载自blog.csdn.net/bellazhouyi/article/details/84835070