i am trying to build zmq 4.0.3 for iOS. i followed steps from here
i added two headers zmq.h and zmq_utils.h to copy files in target aggregate build phase (iOS framework). but when i added this framework to other project i got errors -
"std::__1::basic_string,
std::__1::allocator >::find(char const*, unsigned long, unsigned
long) const", referenced from:
zmq::socket_base_t::parse_uri(char const*,
std::__1::basic_string,
std::__1::allocator >&, std::__1::basic_string, std::__1::allocator >&) in
ZeroMQ-iOS(socket_base.o) "std::__1::basic_string, std::__1::allocator >::compare(char
const*) const", referenced from:
now i m confused what happened with .hpp files. i havent added this to anywhere while in compiled source is file witl all files having extension .cpp and .m.
if anyone had build this frame on xcode 5.0 so please give me instructions on how to build it.
how can i remove these linker error?
Related
Hello I am trying to build a firebase unity project in Xcode, after running pod install
and start building the project I get this error :
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIRMessaging", referenced from:
objc-class-ref in libFirebaseCppMessaging.a(messaging_231c52c311096cfce13e67fa91eb9ac5.o)
"firebase::ReferenceCountedFutureImpl::CompleteHandle(unsigned long)", referenced from:
void firebase::ReferenceCountedFutureImpl::CompleteInternal<void, void firebase::ReferenceCountedFutureImpl::CompleteInternal(unsigned long, int, char const*)::'lambda'(void*)>(unsigned long, int, char const*, void firebase::ReferenceCountedFutureImpl::CompleteInternal(unsigned long, int, char const*)::'lambda'(void*) const&) in libFirebaseCppMessaging.a(messaging_231c52c311096cfce13e67fa91eb9ac5.o)
"firebase::ReferenceCountedFutureImpl::ReleaseMutexAndRunCallback(unsigned long)", referenced from:
void firebase::ReferenceCountedFutureImpl::CompleteInternal<void, void firebase::ReferenceCountedFutureImpl::CompleteInternal(unsigned long, int, char const*)::'lambda'(void*)>(unsigned long, int, char const*, void firebase::ReferenceCountedFutureImpl::CompleteInternal(unsigned long, int, char const*)::'lambda'(void*) const&) in libFirebaseCppMessaging.a(messaging_231c52c311096cfce13e67fa91eb9ac5.o)
"firebase::util::ClassMethodImplementationCache::ReplaceOrAddMethod(objc_class*, objc_selector*, objc_object* ()(objc_object, objc_selector*, ...), objc_class*, bool)", referenced from:
_FirebaseMessagingHookAppDelegate in libFirebaseCppMessaging.a(messaging_231c52c311096cfce13e67fa91eb9ac5.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
any help?
One thing that you can do is make sure you've added your pod file correctly. Check the syntax is correct and if it's not working at all do a pod deinit, clean your build folder, then reinstall the pod again and run your project.
Making sure there is a link between your target and the file also could be worth looking at. Go to your project manager, select your target, and the link binary with libraries and add your pod file that way.
Xcode unittest build failed with error "Undefined symbols for architecture x86_64"
this helped also when looking around how to solve this. Best of luck.
I'm making iOS application with usage of JabberGuest framework from Cisco. I've followed their instruction (provided here) with necessary adjustments. While building, compiler returns almost 100 errors, all around undefined symbol. Core of the application is written in Swift.
Part of error log below:
Undefined symbols for architecture arm64:
"std::__1::recursive_mutex::recursive_mutex()", referenced from:
csf::edge::IpInterfaceChangedEventFilter::IpInterfaceChangedEventFilter() in JabberGuest(IpInterfaceChangedEventFilter.o)
"std::__1::recursive_mutex::~recursive_mutex()", referenced from:
csf::edge::IpInterfaceChangedEventFilter::IpInterfaceChangedEventFilter() in JabberGuest(IpInterfaceChangedEventFilter.o)
csf::edge::IpInterfaceChangedEventFilter::~IpInterfaceChangedEventFilter() in JabberGuest(IpInterfaceChangedEventFilter.o)
csf::edge::IpInterfaceChangedEventFilter::~IpInterfaceChangedEventFilter() in JabberGuest(IpInterfaceChangedEventFilter.o)
"std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
boost::regex_error::regex_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::regex_constants::error_type, long) in JabberGuest(regex.o)
boost::regex_error::regex_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::regex_constants::error_type, long) in JabberGuest(regex.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::underflow()", referenced from:
vtable for boost::re_detail_106501::parser_buf<char, std::__1::char_traits<char> > in JabberGuest(instances.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pbackfail(int)", referenced from:
vtable for boost::re_detail_106501::parser_buf<char, std::__1::char_traits<char> > in JabberGuest(instances.o)
[...]
JCFCoreUtils::EncryptionUtils::privateKeyDecryptToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, csf::SecureString const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in JabberGuest(EncryptionUtils.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::insert(std::__1::__wrap_iter<char const*>, char)", referenced from:
boost::re_detail_106501::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::append_set(boost::re_detail_106501::basic_char_set<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, mpl_::bool_<false>*) in JabberGuest(instances.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(ObjectFoundry.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(ObjcLibraryLoader.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(FileUtils.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(UnifiedFactory.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(ServicesDispatcher.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(Base64FamilyEncoder.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in JabberGuest(TaskDispatcher.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My header looks like this:
#ifndef _ltProjectName_gt_Bridging_Header_h
#define _ltProjectName_gt_Bridging_Header_h
#import "Frameworks/JabberGuest.framework/Headers/JabberGuest.h"
#endif
In build setting, I have Framework Search Path correctly set, Objective-C Bridging Header for both Debug and Release set on correct file, added VALID_ARCHS on armv7 arm64, Architectures set on Standard Achritectures (arm64 armv7). All the necessary libraries are linked in Link Binary With Libraries.
I've tried cleaning Xcode and cache, adding $(inherited) to Other Linker Flags, set Yes to Enable Modules (C and Objective-C). There are no pods in use nor any other 3rd party frameworks.
I'm checking if the project builds right now, without implementing any of methods in other files, so there are no more changes in my project.
Thanks in advance for all the help.
It looks like libc++.dylib is not linked to the project.
Select the project file
select the target
Select the Build Phases sub-tab
Under Link Binary with Libraries press the + button
Select libc++.dylib and press Add
Another option is to try to add -lc++ to the OTHER_LDFLAGS.
I create AwesomeProject with RN command.
open it with xcode and build success by simulator.
I find RN .a libs under folder 'Debug-iphonesimulator'.
create a new xcode project and add step 3 .a libs.
build success.
after copy RCTRootView alloc initWithBundleURL codes in AppDelegate, xcode build failed (simulator selected) with 154 common errors :
Undefined symbols for architecture x86_64:
"std::__1::system_error::system_error(int, std::__1::error_category
const&, char const*)", referenced from:
folly::throwSystemErrorExplicit(int, char const*) in libReact.a(JSBigString.o) "std::__1::basic_streambuf >::setbuf(char*, long)", referenced from:
vtable for google::base_logging::LogStreamBuf in libReact.a(logging.o)
vtable for std::__1::basic_stringbuf, std::__1::allocator > in
libReact.a(logging.o)
vtable for std::__1::basic_stringbuf, std::__1::allocator > in
libReact.a(JSCHelpers.o)
I wonder if this way works? Is it necessary to install RN environment?
I'm stuck with my iOS app (Objective-C).
I'm building an application for my iOS device and I need to use the HDF5 library.
However during my compilation I have some errors :
Undefined symbols for architecture armv7:
"_H5T_NATIVE_FLOAT_g", referenced from:
int flann::(anonymous namespace)::get_hdf5_type<float>() in VisualSearchEngine.o
"_H5open", referenced from:
int flann::(anonymous namespace)::get_hdf5_type<float>() in VisualSearchEngine.o
"_H5Dcreate2", referenced from:
void flann::save_to_file<float>(flann::Matrix<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in VisualSearchEngine.o
"_H5Fopen", referenced from:
void flann::save_to_file<float>(flann::Matrix<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in VisualSearchEngine.o
"_H5Fcreate", referenced from:
void flann::save_to_file<float>(flann::Matrix<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did not put all the error for better reading but you got it.
I understand that HDF5 has been built only with one architecture : x86_64
Indeed after using the following command line on one of the lib,
lipo -info /usr/local/Cellar/hdf5/1.8.17/lib/libhdf5_cpp.dylib
I got this message :
Non-fat file: /usr/local/Cellar/hdf5/1.8.17/lib/libhdf5_cpp.dylib is architecture: x86_64
On my app I use others frameworks and they all are fat file which contains at least the architectures armv7 armv7s i386 and arm64 which is not the case for HDF5.
So It was not a problem.
My question is the following : How can I build/compile HDF5 with the armv7 architecture ? Or is there maybe a framework available which contains the corresponding architectures ?
I need to use with the armv7 architecture because I use another framework which contains only the armv7 architecture.
I'm stuck and I don't know how to move forward.
Thank for your help.
I need to use boost framework in my iOS project. My first mission was getting boost to work for Ios. I tried using this script
http://goodliffe.blogspot.co.uk/2010/09/building-boost-framework-for-ios-iphone.html
but wasn't able to build due to lipo errors (?) and couldn't figure out how to solve it. I looked for a precompiled framework and came accross this project on github:
https://github.com/danomatika/ofxLua
There is an Ios version of boost included in the lib section. So I tried using it in my project
but now when I build my project I am getting these errors:
Undefined symbols for architecture i386:
"vtable for boost::filesystem::detail::utf8_codecvt_facet", referenced from:
(anonymous namespace)::path_locale() in boost(path.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"_inflate", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
"_inflateEnd", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
"_inflateInit_", referenced from:
MatlabIO::uncompressVariable(unsigned int&, unsigned int&, unsigned int&, std::vector<char, std::allocator<char> > const&) in MatlabIO.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also want to make clear that I installed boost using
sudo port install boost
and under my xcode project I am not linking to /usr/local/include/boost/ or something like that. It seems that it is compiling with incorrect architecture.
Any solution for this? Maybe the framework isn't compiled for Ios? Or is my project not referencing the correct version
You can use the BOOST 1.57.0 with ofxiOSBoost static libraries and headers:
https://github.com/danoli3/ofxiOSBoost
Releases for libc++ (c++11), libstdc++.
All build scripts are in the /scripts folder (updated Peter Goodliffe script)