I have a question for the Xojo team: in your IDE project, how do you write your paths to the dylibs in the Frameworks folder? Are you writing @executable_path/…/Frameworks/libname.dylib ? Because that is not working for me.
Let me try to explain.
My project using external dylibs has been working for over a decade. The parent dylib (which has a lot of dependency libs also copied into the Frameworks folder) is accessed using constant in the form:
This has stopped working recently. I read that SIP prevents @executable_path from working directly, and Apple now requires using @rpath which then can point to the @executable_path
I know how to set all that up using install_name_tool in the terminal. (install_name_tool -add_rpath, then install_name_tool -change to point to the rpath).
But it still doesn’t work. It seems that Xojo simply can’t find the dylibs, no matter what I do, because this path @executable_path no longer works. When I point to dylibs installed on my machine using an absolute path in the constant, that works, which would suggest that it’s not the dylibs causing the problem, it’s this path constant.
Please tell me how to write the path so that it will work. Thank you.
Well, I’ve just spotted something … I have to remind myself that the name of the library does not say anything about the compiled version of that library. libwhatever.0.1.5.dylib doesn’t tell you its version. I just noticed that some of these have the right names, but the wrong version compatibility numbers when getting info with otool. This has to be the cause. The mistake must have been made when copying over the dependencies - some were apparently taken from wrong directories. So I think I know how to fix this. Too bad changing all the path names takes tedious hours entering brainless terminal commands, with no guarantee that anything is going to actually work …