Apple Mach-O Linker Error with upnpx library

99封情书 提交于 2019-12-12 11:09:41

问题


I am having a small problem when using the upnpx library.

I have downloaded the library and opened the upnpdemo workspace. 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:

Apple Mach-O Linker Error

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

回答1:


In your new project's build settings, set the C++ Language Dialect and C++ Standard Library to Compiler Default for both of them.




回答2:


If you build upnpx.a with

**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

If you get upnpx.a from web, you can try to lower the Deployment target, 6.

And DO NOT FORGET

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


来源:https://stackoverflow.com/questions/19364416/apple-mach-o-linker-error-with-upnpx-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!