fkuehne/upnpx

Unable to build with iOS 8 & 7 as deployment target

Closed this issue · 4 comments

If I set the deployment target for the demo project to 7 or 8 I get a lot of errors concerning the C++ files.

"Undefined symbols for architecture i386:
"std::string::find(char const_, unsigned long) const", referenced from:
SSDPNotifyAlive::Process(sockaddr_, std::vector<SSDP_HTTP_HEADER*, std::allocator<SSDP_HTTP_HEADER*> >) in libupnpx.a(ssdpnotifyalive.o)
SSDPSearchResp::Process(sockaddr_, std::vector<SSDP_HTTP_HEADER_, std::allocator<SSDP_HTTP_HEADER*> >) in libupnpx.a(ssdpsearchresp.o)
"std::string::c_str() const", referenced from:
"

And I have deleted i386 and 64_x86 as valid architectures from the library project

This usually happens when you are mixing build targets. Check the Base SDK used in each project in the workspace and make sure they are set to the same: iOS 8 (latest). Check the architectures in each project and make sure they are identical. Scroll down further and you will likely see that some projects have the Deployment Target set to iOS 7 (or 6) while others are set to iOS 8. This gives the linker fits. Make sure they all agree and your problem should go away.

You are mixing 2 different C++ libraries. Make sure to use libstdc++.

I am not using the library through CocoaPods. So what change should I do to make it use libstdc++ and fix the errors?

Getting red mark at libupnpx.a library file in Xcode project please give me some guidelines