I want to use libcaldav with following dependency. I have built libcaldav.0.dylib while other dependencies were installed with port or brew on MAC
otool -L ~/lib/libcaldav.0.dylib
~/lib/libcaldav.0.dylib:
~/lib/libcaldav.0.dylib (compatibility version 1.0.0, current version 1.6.0)
/opt/local/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
/opt/local/lib/libgnutls.28.dylib (compatibility version 70.0.0, current version 70.1.0)
/opt/local/lib/libgthread-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.0.0)
/opt/local/lib/libglib-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.0.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
I tried adding those files to Xcode ios app using
Link binary with libraries -> Xcode build phase
Other linker flags -> Build Settings
Setting appropriate search paths
However, I get following warning and error
ld: building for iOS Simulator, but linking against dylib built for
MacOSX file '/lib/libcaldav.0.dylib' for architecture x86_64 clang:
error: linker command failed with exit code 1 (use -v to see
invocation)
Enviroment
Xcode = 6.1
supported Platform = iOS
valid architecture = arm64, armv7 and armv7s
libcaldav source
https://github.com/fd00/yacp/tree/master/libcaldav
Please help me as I have been struggling. Please give me pointers what needs to be done.
You need to build these libraries for iOS and not OS X. Specifically, you will need to use the iOS SDK and armv7 and arm64. If you want to use them in the iOS Simulator as well, you will need to build them for i386 and x86_64 against the iOS Simulator SDK (NOT against the host SDK).
See my answer in cross compile libgcrypt static lib for use on iOS for some hints as to how to do this.
Related
I have a flutter project which uses a plugin written by a colleague (which is not there anymore). I develop on Mac M1.
Since I upgraded to Flutter 2.5, I cannot start my app on iOS in Debug-Mode.
It says
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I remove the dependency to this plugin, everything works.
I tried the following:
Change architecture-settings in xcode
Delete derived data
Delete podfile
Upgrade all dependencies
run pod repo-update
Does anyone have an idea?
Thanks!
I am trying to build openh264 for ios. I have downloaded the source code from the latest release. then changed the PREFIX in makefile to ios_local. After that I did make OS=ios ARCH=arm64 which completed with lot of warning.
After that when I did sudo make OS=ios ARCH=arm64 install It exited with error like below
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libopenh264.2.0.0.dylib] Error 1
After researching it seems like Apple does not support libstdc++ now, so mac os compatible version is libc++ which is supposed to be installed when you install XCode. My XCode version is Version 10.2.1 (10E1001) which is more than enough to get this libc++ I think.I am using macOS Mojave. What's going wrong here?
I intentionally downgraded the clang version I'm compiling with in xcode to a special 3.6 version.
Now I've an error on a flag that was added on a later version of clang
clang-3.6: error: unknown argument: '-gmodules'
Which switch I should disable on Xcode to not add this flag on build ?
I am trying to use the Worklight 6.1.0.1 Objective C libraries from Objective C code to call the Worklight adapter.
I continue to get compile errors when I reference the libraries in my code and add libWorklightStaticLibProject.a to my project and compile for my iOS 7.1 iPhone5 phone (armv7s architecture).
The compiler error is:
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/uname/dev/acct/cordova/platforms/ios/WorklightSDK/libWorklightStaticLibProject.a file '/Users/uname/dev/acct/cordova/platforms/ios/WorklightSDK/libWorklightStaticLibProject.a' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have included the .a file in my list of libraries. My deployment target OS is iOS 5.1.1. Build Active Architecture (for debug) is set to YES. Valid architectures are arm64, armv7, and armv7s.
If I remove armv7s I cannot build for the current architecture (armv7s). If I build for armv7s I get this warning that the Worklight libraries do not contain a slice for the armv7s architecture.
The armv7s architecture is not supported by IBM Worklight at this time.
This is true to all Worklight versions up to Worklight 6.1.0.x.
You can take a look at the Xcode project architecture configuration of a new app with the iPhone/iPad environment for a correct and working architecture configuration.
I use cocoapods and download Aviary SDK from the website and follow all the instructions from website. However, I still get an error below:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AFPhotoEditorController", referenced from:
Any idea how to fix it? Is the libAviarySDK.a compiled for 64bit architecture?
It appears that the library does not have an arm64 compiled binary. You should change your build settings to only build for armv7 and armv7s if you want to continue using this SDK.
If your app requires arm64 support, then you won't be able to use this SDK until its authors provide an arm64 compiled version.
AviarySDK 4.2.1 now supports arm64 architecture.
# lipo -info AviarySDK.framework/AviarySDK
Architectures in the fat file: AviarySDK.framework/AviarySDK are: i386 armv7 armv7s arm64
aviary 3.3.7 is compatible with iOS7. So i suggest you can try to change Architectures of your project to "Standard architectures (armv7, armv7s)"