问题
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