Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If I understand you correctly, you want to link code from obsolete system frameworks.</p> <p>Statically linking would mean you have to take the dylib apart and create a static library from it, which would be difficult to say the least.</p> <p>But you can just copy the affected system frameworks from the older (buggy) system to your application wrapper or some other place close to your executable. Then you link your executable against these frameworks.</p> <p>You can use the terminal to see what libraries you are linking:</p> <pre><code>$ cd foo-project/build/Debug $ otool -L foo foo: /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) </code></pre> <p>It's very easy to change the load command in the mach-o executable to use another path for a linked framework:</p> <pre><code>$ install_name_tool -change /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio @executable_path/CoreAudio.framework/Versions/A/CoreAudio foo $ otool -L foo foo: @executable_path/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) $ DYLD_PRINT_LIBRARIES=1 ./foo dyld: loaded: /Users/nikolai/foo-project/build/Debug/./foo dyld: loaded: /Users/nikolai/foo-project/build/Debug/./CoreAudio.framework/Versions/A/CoreAudio ... </code></pre> <p>You can prepare the (copied) framework so that when you build the foo executable, it has the right load commands automatically:</p> <pre><code>$ install_name_tool -id @executable_path/CoreAudio.framework/Versions/A/CoreAudio CoreAudio.framework/Versions/Current/CoreAudio </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload