Manfred Richter wrote:
I get crazy….
As I understood you "@executable_path" stands for the folder where the executable of my application is. So I changed my code to
Soft Declare Function GetFinanzamt Lib "@executable_path/libericapi.dylib" Alias "EricGetFinanzamt" ( InfoType As CString, ListBuffer As CString) As Int32
Afterwards I created the executable package (app). And for testing I copied all libraries to all folders (step by step) within the package. And to be shire also into the folder of the package. But the Function of the library was never found - always an exception.
Also if I enter the full path to the libraries /.../lib/libericapi.dylib the function will not be found.
You need to know what exactly dyld is saying the error is. Unfortunately RB doesn't currently provide this in the exception information, which you should probably file a Feedback ticket about.
What you can do is try the load the dylib yourself and check the error, like this:
declare function dlopen lib "/usr/lib/libSystem.B.dylib" ( path as CString, mode as integer ) as ptr
declare function dlerror lib "/usr/lib/libSystem.B.dylib" () as CString
dim handle as ptr = dlopen( path, 0 )
if handle = nil then
msgbox( dlerror() )
You can also see what dylibs a given Mach-O file requires by running "otool
-L" on the file.