Hi, this problem corresponds with
http://forum.lazarus.freepascal.org/index.php/topic,34431.0.htmland
http://forum.lazarus.freepascal.org/index.php/topic,32789.0.html.
I try to add my custom dylib to local embedded framework in a Xamarin application.
I already have my dylib compiled and lipoed for all 4 targets (darwin-arm,aarch64 + iphonesim-i386,x86_64).
And I have this demo application for Xamarin:
https://github.com/rolfbjarne/embedded-frameworkssolution simpleapp-with-nativereferences.sln.
Open the solution in Xamarin and replace the MyFramework dylib from this demo (compiled with objective C compiler) with my dylib compiled with FPC.
Then I build Xamarin app for iOS target 8.0 and run iPhone 6 simulator on my virtual OSX (iOS 8 is required for embedded frameworks).
The app crashes immediately and following crash report is created:
...
Dyld Error Message:
Library not loaded: /Volumes/*/mylibrary
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/6B03A753-BC7D-49F2-A607-DFD5085602A0/data/Containers/Bundle/Application/99C2E843-42AC-4664-8ECA-53B5FA0C8AF4/simpleframeworktest.app/simpleframeworktest
Reason: no suitable image found. Did find:
/Volumes/*/mylibrary: missing LC_DYLD_INFO load command
...
What could be the reason?
Versions:
On MAC:
OSX 10.11 El Capitan
FPC 3.1.1 from trunk, crossinstalls compiled from this for all 4 iOS targets
Lazarus 1.7 from trunk
Xamarin 6.1.2
XCode 7.3.1
On Win:
Win7x64
VS 2015
Xamarin iOS 10.2
Thank you