I am trying to generate SDK in that am using audio related framework ,when compiling code am getting below linking errors .Any help for solving these issues.
Undefined symbols for architecture armv7:
"_vDSP_ztoc", referenced from:
FFTRealCalculator::InverseFFT_A(ComplexSplit*, float*, int) in libEywaSDK.a(FFTRealCalculator.o)
"_vDSP_ctoz", referenced from:
FFTRealCalculator::ForwardFFT_A(float const*, unsigned long, ComplexSplit*) in libEywaSDK.a(FFTRealCalculator.o)
"_vDSP_fft_zrip", referenced from:
FFTRealCalculator::ForwardFFT_A(float const*, unsigned long, ComplexSplit*) in libEywaSDK.a(FFTRealCalculator.o)
FFTRealCalculator::InverseFFT_A(ComplexSplit*, float*, int) in libEywaSDK.a(FFTRealCalculator.o)
"_vDSP_create_fftsetup", referenced from:
FFTRealCalculator::Initialize(unsigned char) in libEywaSDK.a(FFTRealCalculator.o)
"_vDSP_destroy_fftsetup", referenced from:
FFTRealCalculator::~FFTRealCalculator() in libEywaSDK.a(FFTRealCalculator.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
These symbols come from Accelerate Framework
I suspect you need to add this to your project.
Go to targets -> Valid Architectures & Remove armv7.
Clean your project & build
Hope it will work for you.
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 am currently getting this error when I am trying to build my project which uses cocos 2dx. I am relatively new to iOS/cocos development so am not particularly familiar with this error.
Undefined symbols for architecture i386:
"rcAlloc(int, rcAllocHint)", referenced from:
duReadContourSet(rcContourSet&, duFileIO*) in libcocos2d iOS.a(RecastDump.o)
duReadCompactHeightfield(rcCompactHeightfield&, duFileIO*) in libcocos2d iOS.a(RecastDump.o)
"rcContext::log(rcLogCategory, char const*, ...)", referenced from:
duLogBuildTimes(rcContext&, int) in libcocos2d iOS.a(RecastDump.o)
logLine(rcContext&, rcTimerLabel, char const*, float) in libcocos2d iOS.a(RecastDump.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am trying to build this project, but its display below error,
Undefined symbols for architecture i386:
"cv::merge(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, cv::_OutputArray const&)", referenced from:
-[RRMainViewController colorSobelEdge:isVertical:] in RRMainViewController.o
"cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)", referenced from:
-[RRMainViewController colorSobelEdge:isVertical:] in RRMainViewController.o
"cv::Exception::Exception(int, std::string const&, std::string const&, std::string const&, int)", referenced from:
-[RRMainViewController floodFillPostprocess:WithColor:] in RRMainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have added OpenCV.framework and added this line in .pch file
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
Added this library in project
libstdc++.6.0.9.dylib
libc++.dylib
libz.1.2.5.dylib
But still got above error.. please help... thanx in advance..
Here is the screenshot for my Build phase
=================================================================
SOLVED
This answer by #karthika has helped me.
Opencv framework or some other files are not added in the build phases. Go to project settings->Build phases->Link binary with libraries and check if opencv exists in the list. Otherwise click on + and add it
Then go in the build phases to compile sources and make sure RRMainViewController.m is present in the list. Otherwise click on + and add it
This answer may help you too: Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
I'm trying to using both OpenCV and Tesseract in my iPhone app.
I have no problem working with either one of them - all is compiled and linked perfectly.
But when I'm trying to work with both of them it gives me link errors:
Undefined symbols for architecture i386:
"cv::_OutputArray::_OutputArray(cv::Mat&)", referenced from:
-[BTLOpenCVCameraViewController processImage:] in BTLOpenCVCameraViewController.o
"cv::_OutputArray::~_OutputArray()", referenced from:
-[BTLOpenCVCameraViewController processImage:] in BTLOpenCVCameraViewController.o
"cv::Mat::deallocate()", referenced from:
cv::Mat::release() in BTLOpenCVCameraViewController.o
"cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)", referenced from:
-[BTLOpenCVCameraViewController processImage:] in BTLOpenCVCameraViewController.o
"cv::fastFree(void*)", referenced from:
cv::Mat::~Mat() in BTLOpenCVCameraViewController.o
"cv::Mat::copyTo(cv::_OutputArray const&) const", referenced from:
-[BTLOpenCVCameraViewController processImage:] in BTLOpenCVCameraViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm running iOS6.1, C++ Standard Library is set to: "Compiler Default"
Architecture is set to: armv7.
ANy ideas??
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)