Undefined symbols when building Poco for iPhone Simulator - iphone

I am having these link errors when building an Xcode 6.1.1 project for Simulator that links with Poco 1.6.0. OSX is 10.10.1 Yosemite.
Undefined symbols for architecture x86_64:
"_opendir$INODE64", referenced from:
Poco::DirectoryIteratorImpl::DirectoryIteratorImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libPocoFoundation.a(DirectoryIterator.o)
"_readdir$INODE64", referenced from:
Poco::DirectoryIteratorImpl::next() in libPocoFoundation.a(DirectoryIterator.o)
ld: symbol(s) not found for architecture x86_64
Questions:
Why is x86_64 architecture needed for the simulator?
Why can't these symbols be resolved?
Thanks in advance.

Related

zbar sdk view third party library error in Xcode 5

I am using z bar SDK in x code 5 when i am archiving its getting following errors
Undefined symbols for architecture armv7:
"_CMSampleBufferGetImageBuffer", referenced from:
-[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
"_CMSampleBufferIsValid", referenced from:
-[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
"_CMSampleBufferDataIsReady", referenced from:
-[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
"_CMSampleBufferGetNumSamples", referenced from:
-[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems you missed the one of the frameworks - Core Media.
Check the following integration link for ZBar sdk.
http://zbar.sourceforge.net/iphone/sdkdoc/install.html#integration
Remove armv7s arm64 Architectures only use the armv7 and solve your problem.
Project -> Build Settings -> Architectures -> Delete armv7s arm64
Importing a header and do not linking against the correct library will cause that error. Check you have imported the correct libraries. A more complete answer can be found here
Undefined symbols for architecture armv7

iPhone - How to add AdSupport.framework in ios?

I am trying to use the AdMob in my test application when I rum my application i am getting the following error as shown below.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled around this errors and everyone telling to add the AdSupport.framework. But when I try to add that framework in my Xcode4.1 and Xcode4.4 there is no AdSupport.framework is not missing. Where can I get it and how to add that framework.
AdSupport.framework available only in iOS6+, so you won't be able to find it in XCode version prior to 4.5
UPD:
According to AdMob 6.2.0 changelog:
Required to use Xcode 4.5 and build against iOS 6. The minimum deployment is iOS 4.3.

XCode 4.3.3 sqlite3 error even after importing and including frameworks

When I run my XCode project using sqlite3, I keep getting the same two errors (appearing between **):
Undefined symbols for architecture i386:
**"_OBJC_CLASS_$_CalendarDatabase", referenced from: objc-class-ref in AppDelegate.o**
ld: symbol(s) not found for architecture i386
clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
I looked everywhere for an answer but all I find is problems with importing sqlite3 and including frameworks. But I've included libsqlite3.0.dylib and libsqlite3.dylib and I've imported sqlite3 using #import "sqlite3.h". I'm still getting these errors. What could be the problem?
In the error message, the words for architecture i386 tells me that your dylibs do not have i386 code (only x86_64). If you're compiling for i386 (32 bits), you'll need either fat dylibs (x86_64 + i386), or 32-bit dylibs.

Why is CoreData not linking in my ported iOS->Mac App?

I'm porting an app from the iOS side to the Mac side and I'm having an annoying linking error where the linker appears to be trying to use the iOS version of the coredata framework instead of the (x86_64) one. I've deleted the framework and re-added it and know I'm adding the mac version. I've also regenerated my model classes. I'm getting this error:
ld: warning: ignoring file /Users/xxxxx/xcode_projects/xxxxx/CoreData.framework/CoreData, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_NSSQLiteStoreType", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSInferMappingModelAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSMigratePersistentStoresAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in CoreDataSingleton.o
etc...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions would be helpful, thanks,
Nick
Link errors usually mean you aren't including a framework in the project.
In the "Link Binary With Libraries" section of the "Build Phases" tab of the build settings for your project, make sure CoreData.framework is listed. If not, press the "+" button and select it.

compile error when using cv::minMaxLoc() on iOS

I am using OpenCV on iOS, the project works fine and can detect harris corners but when I try to use the following line I get a compile error:
cv::minMaxLoc(cornerStrength,&minStrength,&maxStrength);
The error from xcode is:
Undefined symbols for architecture armv7:
"___udivmodsi4", referenced from:
cv::minMaxIdx(cv::_InputArray const&, double*, double*, int*, int*, cv::_InputArray const&)in OpenCV(stat.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
Any advice much appreciated as I cant find a way past this at the moment.
Cheers,
Fraser
If you are using LLVM GCC 4.x, try changing the compiler to Apple LLVM 3.x, that did the trick for me.