iOS WeMo SDK体系结构问题

我正尝试构建一个应用程序,该应用程序通过Belkin控制WeMo开关。他们发布了自己的SDK来控制他们的产品,并且将它们包含在我的库搜索路径以及链接的库和框架工作区中。iOS WeMo SDK体系结构问题

首先,我尝试编译对所有架构(包括arm64),并得到以下的Mach-O连接错误

ld: warning: ignoring file /Users/khwaab/src/enimai/iOS/House Control/- 

iphoneos/BelkinSDKLibrary.a, missing required architecture arm64 in file

/Users/khwaab/src/enimai/iOS/House Control/-iphoneos/BelkinSDKLibrary.a (3 slices)

ld: warning: ignoring file /Users/khwaab/src/enimai/iOS/House Control/-

iphoneos/WeMoLocalControl.a, missing required architecture arm64 in file

/Users/khwaab/src/enimai/iOS/House Control/-iphoneos/WeMoLocalControl.a (3 slices)

ld: warning: ignoring file /Users/khwaab/src/enimai/iOS/House Control/-

iphoneos/Cybergarage.a, missing required architecture arm64 in file

/Users/khwaab/src/enimai/iOS/House Control/-iphoneos/Cybergarage.a (3 slices)

ld: warning: ignoring file /Users/khwaab/src/enimai/iOS/House Control/-

iphoneos/Reachability.a, missing required architecture arm64 in file

/Users/khwaab/src/enimai/iOS/House Control/-iphoneos/Reachability.a (3 slices)

Undefined symbols for architecture arm64:

"_OBJC_CLASS_$_WeMoDiscoveryManager", referenced from:

objc-class-ref in LightControlViewController.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

接下来,我尝试禁用arm64假设库不是64位(如果纠正我,我“M错)

Undefined symbols for architecture armv7s: 

"_xmlGetPredefinedEntity", referenced from:

_cg_libxml2_get_entity in Cybergarage.a(cxml_parser_libxml2.o)

"_xmlCreateMemoryParserCtxt", referenced from:

_cg_libxml2_parsewrapper in Cybergarage.a(cxml_parser_libxml2.o)

"_CNCopyCurrentNetworkInfo", referenced from:

+[NetworkUtilities getCurrentWifiAccessPointName] in

BelkinSDKLibrary.a(NetworkUtilities.o)

"_xmlFreeDoc", referenced from:

_cg_libxml2_parsewrapper in Cybergarage.a(cxml_parser_libxml2.o)

"_SCNetworkReachabilityCreateWithAddress", referenced from:

+[Reachability reachabilityWithAddress:] in Reachability.a(Reachability.o)

"_xmlFreeParserCtxt", referenced from:

_cg_libxml2_parsewrapper in Cybergarage.a(cxml_parser_libxml2.o)

"_xmlParseDocument", referenced from:

_cg_libxml2_parsewrapper in Cybergarage.a(cxml_parser_libxml2.o)

"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:

-[Reachability stopNotifier] in Reachability.a(Reachability.o)

"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:

-[Reachability startNotifier] in Reachability.a(Reachability.o)

"_SCNetworkReachabilitySetCallback", referenced from:

-[Reachability startNotifier] in Reachability.a(Reachability.o)

"_SCNetworkReachabilityGetFlags", referenced from:

-[Reachability description] in Reachability.a(Reachability.o)

-[Reachability currentReachabilityStatus] in Reachability.a(Reachability.o)

-[Reachability isReachable] in Reachability.a(Reachability.o)

-[Reachability isConnectionRequired] in Reachability.a(Reachability.o)

-[Reachability isConnectionOnDemand] in Reachability.a(Reachability.o)

-[Reachability isInterventionRequired] in Reachability.a(Reachability.o)

-[Reachability isReachableViaWWAN] in Reachability.a(Reachability.o)

...

"_CNCopySupportedInterfaces", referenced from:

+[NetworkUtilities getCurrentWifiAccessPointName] in

BelkinSDKLibrary.a(NetworkUtilities.o)

"_SCNetworkReachabilityCreateWithName", referenced from:

+[Reachability reachabilityWithHostName:] in Reachability.a(Reachability.o)

ld: symbol(s) not found for architecture armv7s

clang: error: linker command failed with exit code 1 (use -v to see invocation)

不知道从哪里何去何从,我怀疑库已过期,而不是对ARMv7/7S(它不会建立在模拟器下的i386无论是),但如果任何人有任何这个或任何想法的运气,任何感激。

回答:

这是我从这个问题中恢复的解决方案。

  • 将文件夹-iphonesos中提供的库包含到项目中。
  • 将以下框架添加到项目。

    1. libxml2.dylib 

    2. CFNetwork.framework

    3. MobileCoreServices.framework

    4. Security.framework

    5. SystemConfiguration.framework

  • 然后转到您的构建设置&搜索架构。

  • 通过点击其他添加一个新的值...... &添加此$(ARCHS_STANDARD_32_BIT)

  • 如果您也可以选择,$(ARCHS_STANDARD)意味着Standard architectures (armv7, armv7s)

  • 构建项目,你将摆脱所有的连接器的错误。

回答:

使用此部分显示尽管ARMv7的或$(ARCHS_STANDARD_32_BIT)解决方案的错误?

回答:

这是为了帮助,即使它仍然不符合@ Balram的答案。 您必须在目标的构建设置中的链接部分下的“其他链接器标志”属性中添加-lxml2。 这对我有效

以上是 iOS WeMo SDK体系结构问题 的全部内容, 来源链接: utcz.com/qa/257382.html

回到顶部