Post

Replies

Boosts

Views

Activity

Library not loaded with multiple level nested frameworks on MacOS
I have a MacOS app with a Framework (FrameA) inside. In this FrameA there is a compiled Framework (FrameB). The error is: Library not loaded: @loader_path/../Frameworks/FrameB.framework/Versions/A/FrameB Referenced from: /Users/myUsername/Desktop/AppName.app/Contents/Frameworks/FrameA.framework/Versions/A/FrameA Reason: tried: '/Users/myUsername/Desktop/AppName.app/Contents/Frameworks/FrameA.framework/Versions/A/../Frameworks/FrameB.framework/Versions/A/FrameB' (no such file), '/Library/Frameworks/FrameB.framework/Versions/A/FrameB' (no such file), '/System/Library/Frameworks/FrameB.framework/Versions/A/FrameB' (no such file) I have try in the FrameA to embed FrameB but it can't find it because of the path. There is always a /../ and this is the problem because it go one folder back. It should not. You can see the problem in this part of the error: FrameA.framework/Versions/A/../Frameworks When i try to edit the runpath on FrameB, the app still seach on the same place. It has not effect whatever i change there. If i change the runpath of the app to @executable_path/Frameworks then it can't find FrameA. This is expected but i don't understand why it ignore what i write in the runtime of FrameA. Another try was to not embed FrameB into FrameA but directly into the App. The App (exported) still complain and want to seach FrameB after the path of FrameA. But in this test FrameB was no more embed into FrameA. In my App runpath i have: $(inherited) @executable_path/../Frameworks @loader_path/Frameworks In the FrameA runpath i have (its completly ignored in any case): $(inherited) @executable_path/Frameworks @loader_path/Frameworks When i look into the exported app, the FrameB is on the place wanted for both try. Only the path to search it is wrong with this /../ in the middle of the path. How can i fix this ?
2
0
1.1k
Apr ’22