Xcode 10 Removing lstdc++ - ios

lstdc++ is removed from Xcode 10 so I removed this lib from "Link Binary With Libraries" and I added libc++.tbd but I got something like that in linker
Undefined symbols for architecture x86_64:
"std::ios_base::Init::~Init()", referenced from:
__GLOBAL__sub_I_BVMDOfflineMapMerge.cpp in BaiduMapAPI_Map(BVMDOfflineMapMerge.o)
"std::string::assign(std::string const&)", referenced from:
_baidu_framework::HandleBasemapMerge(_baidu_vi::CVString const&, _baidu_vi::CVString const&, _baidu_vi::CVString const&, char const*) in BaiduMapAPI_Map(BVMDOfflineMapMerge.o)
"std::string::_Rep::_S_empty_rep_storage", referenced from:
_baidu_framework::HandleBasemapMerge(_baidu_vi::CVString const&, _baidu_vi::CVString const&, _baidu_vi::CVString const&, char const*) in BaiduMapAPI_Map(BVMDOfflineMapMerge.o)
"std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)", referenced from:
_baidu_framework::CBVDCVersion::Save() in BaiduMapAPI_Map(BVDEDataCfg.o)
I assue its problem with c++ lib.

maybe ,sdk need update
BaiduMap maybe depend old lib

Related

OpenTok (iOS) v2.4.0 (64-bit) -- Undefined symbols for architecture armv7

I'm trying to upgrade to the latest version of OpenTok iOS SDK. However, I keep getting the tons of linking errors like the ones below. It seems as if this latest version does not support armv7.
Undefined symbols for architecture armv7:
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(short)", referenced from:
webrtc::NetEqImpl::DecodeLoop(std::__1::list<webrtc::Packet*, std::__1::allocator<webrtc::Packet*> >*, webrtc::Operations*, webrtc::AudioDecoder*, int*, webrtc::AudioDecoder::SpeechType*) in OpenTok(neteq.neteq_impl.o)
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* rtc::MakeCheckOpString<int, short>(int const&, short const&, char const*) in OpenTok(neteq.audio_decoder_impl.o)
"void std::__1::__sort<std::__1::__less<unsigned char, unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, std::__1::__less<unsigned char, unsigned char>&)", referenced from:
webrtc::Sort(void*, unsigned int, webrtc::Type) in OpenTok(system_wrappers.sort.o)
void boost::detail::spread_sort_rec<unsigned char*, int, unsigned char>(unsigned char*, unsigned char*, std::__1::vector<unsigned char*, std::__1::allocator<unsigned char*> >&, unsigned int, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&) in OpenTok(system_wrappers.sort.o)
"void std::__1::__sort<std::__1::__less<unsigned short, unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, std::__1::__less<unsigned short, unsigned short>&)", referenced from:
webrtc::Sort(void*, unsigned int, webrtc::Type) in OpenTok(system_wrappers.sort.o)
void boost::detail::spread_sort_rec<unsigned short*, int, unsigned short>(unsigned short*, unsigned short*, std::__1::vector<unsigned short*, std::__1::allocator<unsigned short*> >&, unsigned int, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&) in OpenTok(system_wrappers.sort.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(unsigned long, char)", referenced from:
rtc::HttpParseAttributes(char const*, unsigned long, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >&) in OpenTok(rtc_base.httpcommon.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(unsigned long long)", referenced from:
webrtc::WebRtcSession::WebRtcSession(cricket::ChannelManager*, rtc::Thread*, rtc::Thread*, cricket::PortAllocator*, webrtc::MediaStreamSignaling*) in OpenTok(libjingle_peerconnection.webrtcsession.o)
cricket::Connection::ToString() const in OpenTok(rtc_p2p.port.o)
webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer(webrtc::CreateSessionDescriptionRequest) in OpenTok(libjingle_peerconnection.webrtcsessiondescriptionfactory.o)
webrtc::WebRtcSessionDescriptionFactory::InternalCreateAnswer(webrtc::CreateSessionDescriptionRequest) in OpenTok(libjingle_peerconnection.webrtcsessiondescriptionfactory.o)
However, the lipo command confirms that the framework does support both armv7 and arm64 architectures:
$> lipo -info OpenTok.framework/OpenTok
Architectures in the fat file: OpenTok.framework/OpenTok are: armv7 armv7s i386 x86_64 arm64
I'm at my wit's end, any help would be highly appreciated.
Thanks!
Okay, I got this resolved thanks to a prompt response from OpenTok support team! I'd posted the same question on their support forum as well. (https://forums.tokbox.com/post55977)
Here's the solution that worked for me (verbatim from the above link)
What are your Build settings? armv7 is supported.
also make sure that you have added the new lib/frameworks as follows:
- Add VideoToolbox.framework.
- Remove libstdc++ and add libc++
- add GLKit.framework (if not there previously)
A couple of the above mentioned files were missing from my frameworks list. I'm attaching a screenshot of the complete list, just in case someone else comes across the same issue.
I wasted close to 6 hours on this!! :(

Cocos2dx :Undefined symbols for architecture i386

I import a project cocos2dx into Xcode 5, then build it.
Undefined symbols for architecture i386:
"cocos2d::extension::CocoLoader::ReadCocoBinBuff(char*)", referenced from:
cocos2d::extension::CCDataReaderHelper::addDataFromBinaryCache(char const*, cocos2d::extension::_DataInfo*) in CCDataReaderHelper.o
cocos2d::extension::CCComRender::serialize(void*) in CCComRender.o
cocos2d::extension::GUIReader::widgetFromBinaryFile(char const*) in GUIReader.o
cocos2d::extension::SceneReader::createNodeWithSceneFile(char const*, cocos2d::extension::AttachComponentType) in SceneReader.o
"cocos2d::extension::CocoLoader::CocoLoader()", referenced from:
cocos2d::extension::CCDataReaderHelper::addDataFromBinaryCache(char const*, cocos2d::extension::_DataInfo*) in CCDataReaderHelper.o
cocos2d::extension::CCComRender::serialize(void*) in CCComRender.o
cocos2d::extension::GUIReader::widgetFromBinaryFile(char const*) in GUIReader.o
cocos2d::extension::SceneReader::createNodeWithSceneFile(char const*, cocos2d::extension::AttachComponentType) in SceneReader.o
"cocos2d::extension::CocoLoader::~CocoLoader()", referenced from:
cocos2d::extension::CCDataReaderHelper::addDataFromBinaryCache(char const*, cocos2d::extension::_DataInfo*) in CCDataReaderHelper.o
cocos2d::extension::CCComRender::serialize(void*) in CCComRender.o
cocos2d::extension::GUIReader::widgetFromBinaryFile(char const*) in GUIReader.o
cocos2d::extension::SceneReader::createNodeWithSceneFile(char const*, cocos2d::extension::AttachComponentType) in SceneReader.o
"cocos2d::extension::LabelReader::createInstance()", referenced from:
cocos2d::extension::GUIReader::GUIReader() in GUIReader.o
"cocos2d::extension::ButtonReader::createInstance()", referenced from:
cocos2d::extension::GUIReader::GUIReader() in GUIReader.o
"cocos2d::extension::LayoutReader::createInstance()", referenced from:
cocos2d::extension::GUIReader::GUIReader() in GUIReader.o
"cocos2d::extension::SliderReader::createInstance()", referenced from:
cocos2d::extension::GUIReader::GUIReader() in GUIReader.o
"cocos2d::extension::stExpCocoNode::GetChildNum()", referenced from:
I tried to remove i386 in Valid architechture, but it do not work
I don't know how to fix it. Please help
If your deployment target is 7 then change it to 6
I fixed that issue by going on the target properties of my project and in general tab there's a section called "Linked frameworks and libraries" I added here all the libraries my project uses and that's it, additionally I selected in section "Match-o type" in project properties linking section the option "Static library" also works with "Dynamic library".

Google Maps SDK for iOS and libc++

In our project we use library that use libc++ in its implementation very tightly. And when we added Google Maps SDK we got linkage error:
Undefined symbols for architecture i386:
"std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
_GMS_objc_lookUpClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getProtocol in GoogleMaps(GMSRenames.o)
gmscore::vector::CameraPosition::StringValue() const in GoogleMaps(CameraPosition.o)
"std::string::_Rep::_S_empty_rep_storage", referenced from:
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
_GMS_objc_lookUpClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getProtocol in GoogleMaps(GMSRenames.o)
gmscore::vector::CameraPosition::StringValue() const in GoogleMaps(CameraPosition.o)
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
_GMS_objc_lookUpClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getProtocol in GoogleMaps(GMSRenames.o)
gmscore::vector::CameraPosition::StringValue() const in GoogleMaps(CameraPosition.o)
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
_GMS_objc_lookUpClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getClass in GoogleMaps(GMSRenames.o)
_GMS_objc_getProtocol in GoogleMaps(GMSRenames.o)
gmscore::vector::CameraPosition::StringValue() const in GoogleMaps(CameraPosition.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
gmscore::model::Point2D::StringValue() const in GoogleMaps(Point2D.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)", referenced from:
gmscore::utils::gmsutils::StringPrintf(char const*, ...) in GoogleMaps(GMSUtils.o)
gmscore::vector::CameraPosition::StringValue() const in GoogleMaps(CameraPosition.o)
It's happened because google maps sdk use libstdc++ library, but we can not change code which use libc++. We tried to encapsulate code and library which use libc++ in static library (*.a), but without success.
Any chance to make things work? Maybe, it's possible to link Google Maps SDK with libc++?
The undefined symbols you are seeing are symbols associated with libstdc++. libstdc++ and libc++ are largely ABI incompatible, even though they present to you (largely) the same API.
In places where the ABI incompatibility is known, such as std::string, libc++ uses a different mangling scheme so that libstdc++ and libc++ strings are not accidentally mixed at run time (which would cause hard-to-debug run time errors).
If you see symbols that have std::__1 in their name, then those are symbols associated libc++, e.g. libc++ has std::__1::basic_string<..., where as libstdc++ has std::basic_string<....
You can use this knowledge of mangling to help you determine which libraries are needing which implementations of the std::lib.
Filing the feature request you did was the very best thing you could do, and thank you for doing that! :-)

Tesseract 3.01 and Pocket-OCR build issues

I got some issues as below while try to build Pocket-OCR
Undefined symbols for architecture i386:
"tesseract::TessBaseAPI::SetVariable(char const*, char const*)",
referenced from:
-[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o
"tesseract::TessBaseAPI::TesseractRect(unsigned char const*, int, int,
int, int, int, int)", referenced from:
-[OCRDisplayViewController readAndProcessImage:] in OCRDisplayViewController.o
-[OCRDisplayViewController threadedReadAndProcessImage:] in OCRDisplayViewController.o
"tesseract::TessBaseAPI::AllWordConfidences()", referenced from:
-[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o "tesseract::TessBaseAPI::End()",
referenced from:
-[OCRDisplayViewController dealloc] in OCRDisplayViewController.o "tesseract::TessBaseAPI::Init(char
const*, char const*, tesseract::OcrEngineMode, char*, int,
GenericVector const, GenericVector const*, bool)",
referenced from:
tesseract::TessBaseAPI::Init(char const*, char const*) in OCRDisplayViewController.o "tesseract::TessBaseAPI::TessBaseAPI()",
referenced from:
-[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o ld: symbol(s) not found for architecture
i386 clang: error: linker command failed with exit code 1 (use -v to
see invocation)
What should I do to resolve this issues?
I search on goole for answer but does'n get much help to solve the issues.
you can reference this solution on SO
I got the solution for this and also got new links and examples that are working fine and have completed my demo project
May these links are useful for others who want's to use it.
Example One
Now got the exact link from where I am able to develop my demo project.
Example Which I used
Though the answer is already accepted I found the solution that worked for me:
Apparently xCode does not add frameworks automatically to the "Link Binary With Libraries"- and "Copy Bundle Resources"-lists.
You can find them by clicking on your projectname (blue icon) and then go to "Build Phases" and add them to both lists. Then change from "Required" to "Optional". Both can be seen in the screenshot.

I have link error with OpenCV and XCode4.2

I'm trying to link OpenCV in my iPhone project. I upgraded project made on Xcode3.x for latest Xcode. So I need to link opencv built on Xcode 4.3.
I followed the guide in http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en.
But I meet the link error like below.
Undefined symbols for architecture i386:
"_dgesdd_", referenced from:
cv::_SVDcompute(cv::Mat const&, cv::Mat&, cv::Mat*, cv::Mat*, int) in libopencv_core.a(lapack.o)
"_sgesdd_", referenced from:
cv::_SVDcompute(cv::Mat const&, cv::Mat&, cv::Mat*, cv::Mat*, int) in libopencv_core.a(lapack.o)
"_dpotrf_", referenced from:
cv::solve(cv::Mat const&, cv::Mat const&, cv::Mat&, int) in libopencv_core.a(lapack.o)
cv::invert(cv::Mat const&, cv::Mat&, int) in libopencv_core.a(lapack.o)
......
I wonder I never configured i386 architecture. Please tell me how I can fix this issue.
Oh, I found that I missed Accelerate.framework in Build Phase.
You can add framework in [Project]->[Build Phases]->[Link Binary With Libraries].

Resources