简体   繁体   English

Apple Mach-O链接器错误与upnpx库

[英]Apple Mach-O Linker Error with upnpx library

I am having a small problem when using the upnpx library. 使用upnpx库时遇到一个小问题。

I have downloaded the library and opened the upnpdemo workspace. 我已经下载了库并打开了upnpdemo工作区。 I created in the same workspace a new project to try to create a simple app with this library. 我在同一工作区中创建了一个新项目,尝试使用此库创建一个简单的应用程序。 I set the parameters like a demo project, but XCode returns 21 errors: 我将参数设置为演示项目,但XCode返回21个错误:

Apple Mach-O Linker Error

Undefined symbols for architecture i386:
"std::string::find(char const*, unsigned long) const", referenced from:

在新项目的构建设置中,将C ++语言方言C ++标准库设置Compiler Default

If you build upnpx.a with 如果你用up构建upnpx.a

**C++ Language Dialect** GNU++11[-std=gnu++11]
**C++ Standard Library** libc++ (LLVM C++ standard library with C++11 support)

In your project you must iOS Deployment Target 7.0 or above 在您的项目中,您必须是iOS部署目标7.0或更高版本

If you get upnpx.a from web, you can try to lower the Deployment target, 6. 如果从Web获取upnpx.a,则可以尝试降低部署目标,6。

And DO NOT FORGET 并且不要忘记

**Other Linker Flags**: -lstdc++

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM