I created an Objective-C Framework for CanonEDSDK in which EdsInitializeSDK
only support i386 architecture. I imported the framework into a Swift Project, but at the point of calling EdsInitializeSDK()
I get the following error:
"_EdsInitializeSDK", referenced from: test.AppDelegate.applicationDidFinishLaunching (test.AppDelegate)(__ObjC.NSNotification) -> () in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As described by @MartinR in the comments, Swift is 64 bits exclusively so all libraries used should be 64 bits. The EDSDK v3.2.1 for OSX does contain a 64bit version which you can use.
Be aware that in this 64 bit version, operations on RAW files (saving as TIFF, but even reading info) can only be performed on files created by a limited set of new cameras :
Operations on files from older cameras will attempt to dynamically load a 32-bit library, resulting in a runtime dynamic linking error!