Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding a framework to XCode 4
    text
    copied!<p>of course i did research before posting my question.</p> <p>I looked at<br> <a href="https://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4">How to &quot;add existing frameworks&quot; in Xcode 4?</a><br> <a href="https://stackoverflow.com/questions/6334966/adding-framework-in-xcode-4">Adding Framework in Xcode 4</a><br> <a href="https://stackoverflow.com/questions/5395721/adding-an-opengl-framework-in-xcode-4">Adding an OpenGL framework in Xcode 4</a><br> <a href="https://stackoverflow.com/questions/6801709/xcode-4-adding-dylib">XCode 4 adding dylib</a> </p> <p>but whole thing is becoming wrong.</p> <p>My goal: <b>Add (CorePlot) framework to XCode Mac project</b> (not an iPhone one)</p> <p>My environment: OSX Lion 10.7, SDK Lion, XCode 4.1 (4B110)</p> <p>My steps: </p> <ul> <li>Opened XCode, created new project</li> <li>Downloaded CorePlot into my libraries directory (like ~/Applications/LIBS)</li> <li>Opened project preferences, via (+) opened dialog to add framework</li> <li>Add existing framework (+ copy files to dest. group if needed)</li> <li>Selected directory was ~/Applications/LIBS/CorePlot/Binaries/MacOS/CorePlot.framework/</li> <li>DnD CorePlot to Frameworks Group</li> <li>Added CorePlot to <code>Build Phases &gt; Link Binary with Libraries</code></li> </ul> <p>and ran my project</p> <p>what I got is this error message:</p> <pre><code>dyld: Library not loaded: @loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/metralight-hjuvuwlhgohrtdeepvcymnsaxomc/Build/Products/Debug/metralight.app/Contents/MacOS/metralight Reason: image not found </code></pre> <p>And in fact, when I looked into given directory (app bundle) there was no directory <code>Frameworks</code> and so the linking cannot be successful</p> <p>I have searched one more, and found, that I can create <code>Build Rule</code> and copy files into final binary bundle via some script, but is this only way how to do this?</p> <p>Isn't there some option to just turn on/off copying linked frameworks to final bundle?</p> <p>Note that CorePlot target '.framework' has <code>Dynamic Library Install Name</code> set to <code>@loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot</code>, so it is looking in right place in final binary bundle</p>
 

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