I want to integrate the Aviary SDK Objective-C library into Monotouch project. I use 'Monotouch Binding Project' template for this. So I have created the API Definition file and define LinkWith Attributes.
[assembly: LinkWith ("libAviarySDK.a", LinkTarget = LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.Simulator, ForceLoad = true, IsCxx = true, Frameworks="CoreGraphics QuartzCore Accelerate StoreKit CoreData", LinkerFlags="-ObjC -all_load -fobjc-arc")]
It requires the following libraries:
Foundation.framework
UIKit.framework
CoreGraphics.framework
QuartzCore.framework
Accelerate.framework
StoreKit.framework
libz.1.2.5.dylib
libsqlite3.0.dylib
CoreData.framework
All these frameworks are linked without problems except the libsqlite3.0.dylib
The problem that I am encountering, though, is that the library depends on libsqlite3.0.dylib and I do not know how to include these frameworks in my MonoTouch application.
In a result - compiler returns the following errors:
/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -u
_catch_exception_raise -force_load /var/folders/2n/ql7wkht57cg8wfgzz0cr9trm0000gn/T/tmp31d0b99b.tmp/libAviarySDK.a
-ObjC -all_load -fobjc-arc
Undefined symbols for architecture i386:
"_sqlite3_open", referenced from:
-[AFLocalyticsDatabase init] in libAviarySDK.a(AFLocalyticsDatabase.o)
"_sqlite3_busy_timeout", referenced from:
-[AFLocalyticsDatabase init] in libAviarySDK.a(AFLocalyticsDatabase.o)
"_sqlite3_exec", referenced from:
-[AFLocalyticsDatabase beginTransaction:] in libAviarySDK.a(AFLocalyticsDatabase.o)
* And many other same references *
ld: symbol(s) not found for architecture i386 collect2: ld returned
1 exit status
mtouch exited with code 1
Try adding -lsqlite3.0 to your LinkerFlags for your binding to instruct the (native) linker to load the SQLite library (and symbols).
[assembly: LinkWith ("your_lib.a", LinkTarget.ArmV7, ForceLoad = true, LinkerFlags="-lsqlite3.0")]
Related
I have an app, and suddenly i got following errors. I have those frameworks imported by carthage directly in project.
In my ViewController class i just paste:
import Alamofire
print(AlamofireVersionNumber)
ld: warning: Auto-Linking framework not found Realm
ld: warning: Auto-Linking framework not found Alamofire
Undefined symbols for architecture armv7:
"_AlamofireVersionNumber", referenced from:
ChpuDemo.ViewController.viewDidLoad() -> () in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did try to clean, delete derived data etc. What does that errors mean?
I solve issue by adding the same framework via CocoaPods for main project, that duplicate the same framework that was in my custom library.
I have followed all the steps here manually and with pods and yet I always have a similar issue, an error like this one:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SFSafariViewController", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I added all of the frameworks manually:
AdSupport.framework
AudioToolbox.framework
AVFoundation.framework
CoreGraphics.framework
CoreTelephony.framework
EventKit.framework
EventKitUI.framework
MessageUI.framework
StoreKit.framework
SystemConfiguration.framework
including safariservices and corebluetooth
How can I solve this error?
YES problem solved when i update XCODE to the last version
I am attempting to use Google Cast Remote Display. Simply adding the GoogleCastRemoteDisplay.framework results in linking errors. I have sorted out some, but cannot figure this out...
Anyone have an idea?
Undefined symbols for architecture armv7:
"_kvImage_ARGBToYpCbCrMatrix_ITU_R_709_2", referenced from:
l034 in GoogleCastRemoteDisplay(libCastRemoteDisplay.a-armv7-master.o)
"_vImageConvert_ARGB8888To420Yp8_Cb8_Cr8", referenced from:
l035 in GoogleCastRemoteDisplay(libCastRemoteDisplay.a-armv7-master.o)
"_vImageConvert_ARGB8888To420Yp8_CbCr8", referenced from:
l035 in GoogleCastRemoteDisplay(libCastRemoteDisplay.a-armv7-master.o)
"_vImageConvert_ARGBToYpCbCr_GenerateConversion", referenced from:
l034 in GoogleCastRemoteDisplay(libCastRemoteDisplay.a-armv7-master.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solved it by running "pod install" instead of manually bringing in the .framework However this is a unity project, so there were issues with
The Unity-iPhone [Release] target overrides the HEADER_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
went to project build settings->Other Linker Flags and added $(inherited)
Absolutely right that the Cocoapod is the best way of grabbing the library. If you were pulling it in manually thought, you'll need to link in the appropriate system frameworks, and the regular google-cast-sdk, which is dependends on - you can actually read these from the podspec even if you're not using Cocoapods. These are:
Accelerate
AudioToolbox
CoreMedia
CoreVideo
OpenGLES
QuartzCore
And Metal if using that rendering method.
The functions you listed are from the Accelerate framework.
I'm creating a new tabbed iOS application in xCode 5.1.1. I'm had done research but none of the solutions work to me. So I ended up with migration from xCode 6.1 to xCode 5.1.1. But the problem still occur which I have no idea now. Perhaps the settings in architecture i386 need to be changed. But I have no idea how.
Error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o) "_OBJC_CLASS_$_CMMotionManager", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdAnalogInfo.o) ld: symbol(s) not found for architecture i386 clang: error: linker command
failed with exit code 1 (use -v to see invocation)
Build Settings
Standard architectures(armv7, armv7s, arm64) - $(ARCHS_STANDARD)
Build Active Architecture Only : YES / NO
Update:
After adding CoreMotion and AdSupport frameworks, errors had been reduced. But left one more error which state:
missing required architecture x86_64 in file {DIRECTORY}/FacebookSDK/Bolts.framework/Bolts (2 slices)
duplicate symbol _OBJC_IVAR_$_AppDelegate._window in
Current Framework:
CoreMotion
AdSupport
CoreGraphics
FacebookSDK
UIKit
FBAudienceNetwork
Foundation
Bolts
You need to link
AdSupport.framework
CoreMotion.framework
Did you remove Sample folder after dragging in the FacebookSDK into Frameworks group of your Xcode project? I had the same issue, and it was because Xcode tried to compile all the samples too. Removed Samples folder - everything works as a charm - no need to add AdSupport or any other framework.
You probably didn't add AdSupport.framework.
set property for architecture as below image..
Delete Sample Folder. Clean and Build. Will work like a charm.
I followed the quick start tutorial and solved issues with the Facebook SDK being required (Even though I'm not using Facebook), but for some reason even though I'm using a version of the Parse SDK that should be compatible for 64bit architectures I am receiving errors stating that it can't compile for my iPhone 5S's 64bit architecture...
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_PFAnalytics", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_Parse", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The code it crashes on is when I just set up the Parse object and analytics:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Parse setApplicationId:#"MyAppID"
clientKey:#"MyClientID"];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
return YES;
}
My Other Linker Flags includes -ObjC and my Standard Architectures & Valid Architectures both include arm64, armv7s, & armv7
You did not imported all the frameworks that is needed to use the Parse SDK.
**AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
libz.dylib
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework**
And you need to make sure that you market the COPY option when moved the PARSE SDK into your framework
The solution was to remove the -ObjC linker flag and the Facebook SDK. This lead to an error with another 3rd party framework I was using which required the -ObjC linker flag, but #Fosco suggested I force load the framework I needed using the -force_load path/to/framework flag which solved all my problems.
Adding Bolts.framework that comes with Parse frameworks to the project solved the problem for me. Hope this helps