我正在尝试从 openhome.org 构建 ohNet UPnP 堆栈,以便在 iPhone 和 iPhoneSimulator 上执行。我在网络上的各个地方都看到有一个 iOS 端口,并且确实在 Makefile 中有一些关于 iOS 构建的参考。在对 $DEVROOT 和 $SDKROOT 路径进行了一些编辑之后,我可以编译许多源代码,但是构建在以下位置停止并出现错误:
g++ -pthread -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/ -arch armv6 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system -shared -shared-libgcc -o Build/Obj/Mac/arm/Release/libohNet.dylib Build/Obj/Mac/arm/Release/Ascii.o Build/Obj/Mac/arm/Release/AsyncC.o Build/Obj/Mac/arm/Release/AsyncPrivate.o Build/Obj/Mac/arm/Release/Bonjour.o Build/Obj/Mac/arm/Release/Buffer.o Build/Obj/Mac/arm/Release/Discovery.o Build/Obj/Mac/arm/Release/Debug.o Build/Obj/Mac/arm/Release/Converter.o Build/Obj/Mac/arm/Release/CpDeviceCore.o Build/Obj/Mac/arm/Release/CpDeviceC.o Build/Obj/Mac/arm/Release/CpDeviceStd.o Build/Obj/Mac/arm/Release/CpDeviceDvCore.o Build/Obj/Mac/arm/Release/CpDeviceDvStd.o Build/Obj/Mac/arm/Release/CpDeviceDvC.o Build/Obj/Mac/arm/Release/CpDeviceUpnpCore.o Build/Obj/Mac/arm/Release/CpDeviceUpnpC.o Build/Obj/Mac/arm/Release/CpDeviceUpnpStd.o Build/Obj/Mac/arm/Release/CpiDevice.o Build/Obj/Mac/arm/Release/CpiDeviceDv.o Build/Obj/Mac/arm/Release/CpiDeviceUpnp.o Build/Obj/Mac/arm/Release/CpiService.o Build/Obj/Mac/arm/Release/CpiStack.o Build/Obj/Mac/arm/Release/CpiSubscription.o Build/Obj/Mac/arm/Release/CpProxy.o Build/Obj/Mac/arm/Release/CpProxyC.o Build/Obj/Mac/arm/Release/CpServiceC.o Build/Obj/Mac/arm/Release/DvDevice.o Build/Obj/Mac/arm/Release/DvDeviceStd.o Build/Obj/Mac/arm/Release/DvDeviceC.o Build/Obj/Mac/arm/Release/DviDevice.o Build/Obj/Mac/arm/Release/DvInvocationC.o Build/Obj/Mac/arm/Release/DvInvocationStd.o Build/Obj/Mac/arm/Release/DviProtocolUpnp.o Build/Obj/Mac/arm/Release/DviProviderSubscriptionLongPoll.o Build/Obj/Mac/arm/Release/DvOpenhomeOrgSubscriptionLongPoll1.o Build/Obj/Mac/arm/Release/DviServer.o Build/Obj/Mac/arm/Release/DviServerUpnp.o Build/Obj/Mac/arm/Release/DviServerWebSocket.o Build/Obj/Mac/arm/Release/DviService.o Build/Obj/Mac/arm/Release/DviStack.o Build/Obj/Mac/arm/Release/DviSubscription.o Build/Obj/Mac/arm/Release/DviPropertyUpdateCollection.o Build/Obj/Mac/arm/Release/DvProvider.o Build/Obj/Mac/arm/Release/DvProviderC.o Build/Obj/Mac/arm/Release/DvServerUpnp.o Build/Obj/Mac/arm/Release/DvServerUpnpC.o Build/Obj/Mac/arm/Release/DeviceXml.o Build/Obj/Mac/arm/Release/Error.o Build/Obj/Mac/arm/Release/EventUpnp.o Build/Obj/Mac/arm/Release/Exception.o Build/Obj/Mac/arm/Release/Fifo.o Build/Obj/Mac/arm/Release/Http.o Build/Obj/Mac/arm/Release/DNSCommon.o Build/Obj/Mac/arm/Release/DNSDigest.o Build/Obj/Mac/arm/Release/mDNS.o Build/Obj/Mac/arm/Release/uDNS.o Build/Obj/Mac/arm/Release/MdnsPlatform.o Build/Obj/Mac/arm/Release/MdnsProvider.o Build/Obj/Mac/arm/Release/Maths.o Build/Obj/Mac/arm/Release/Md5.o Build/Obj/Mac/arm/Release/NetworkAdapterList.o Build/Obj/Mac/arm/Release/Network.o Build/Obj/Mac/arm/Release/Parser.o Build/Obj/Mac/arm/Release/Printer.o Build/Obj/Mac/arm/Release/ProtocolUpnp.o Build/Obj/Mac/arm/Release/Queue.o Build/Obj/Mac/arm/Release/RefCounter.o Build/Obj/Mac/arm/Release/Service.o Build/Obj/Mac/arm/Release/ServiceC.o Build/Obj/Mac/arm/Release/sha1.o Build/Obj/Mac/arm/Release/Ssdp.o Build/Obj/Mac/arm/Release/SsdpDv.o Build/Obj/Mac/arm/Release/Stack.o Build/Obj/Mac/arm/Release/Stream.o Build/Obj/Mac/arm/Release/Subscription.o Build/Obj/Mac/arm/Release/Thread.o Build/Obj/Mac/arm/Release/Timer.o Build/Obj/Mac/arm/Release/Uri.o Build/Obj/Mac/arm/Release/XmlParser.o Build/Obj/Mac/arm/Release/XmlFetcher.o Build/Obj/Mac/arm/Release/OhNet.o Build/Obj/Mac/arm/Release/OhNetCp.o Build/Obj/Mac/arm/Release/OhNetDv.o Build/Obj/Mac/arm/Release/OhNetCombined.o Build/Obj/Mac/arm/Release/OhNetC.o Build/Obj/Mac/arm/Release/OhNetCCp.o Build/Obj/Mac/arm/Release/OhNetCDv.o Build/Obj/Mac/arm/Release/OhNetCCombined.o Build/Obj/Mac/arm/Release/OsWrapper.o Build/Obj/Mac/arm/Release/Os.o
llvm-g++-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2': execvp: No such file or directory
make: *** [ohNetDll] Error 255
我不明白为什么构建过程要为这个平台构建 ohNetDll,也不明白如何选择退出该部分/目标。iOS 应用程序不支持动态库,当然也不支持 Windows 原生的 dll。
如果你已经在 iOS 上构建/移植/使用了 ohNet,你能告诉我怎么做吗?我想在 ohNet 论坛上发布这个问题,但我无法注册(因为我还没有提交安全问题,即使表单上无处可做!)。
ohNet 的源代码、文档和 API 指南看起来都非常有前途,所以我希望你能提供建议......