<i id='ibaQ8'><tr id='ibaQ8'><dt id='ibaQ8'><q id='ibaQ8'><span id='ibaQ8'><b id='ibaQ8'><form id='ibaQ8'><ins id='ibaQ8'></ins><ul id='ibaQ8'></ul><sub id='ibaQ8'></sub></form><legend id='ibaQ8'></legend><bdo id='ibaQ8'><pre id='ibaQ8'><center id='ibaQ8'></center></pre></bdo></b><th id='ibaQ8'></th></span></q></dt></tr></i><div id='ibaQ8'><tfoot id='ibaQ8'></tfoot><dl id='ibaQ8'><fieldset id='ibaQ8'></fieldset></dl></div>
  1. <tfoot id='ibaQ8'></tfoot>
    • <bdo id='ibaQ8'></bdo><ul id='ibaQ8'></ul>

    1. <legend id='ibaQ8'><style id='ibaQ8'><dir id='ibaQ8'><q id='ibaQ8'></q></dir></style></legend>

      <small id='ibaQ8'></small><noframes id='ibaQ8'>

      向 XCode 4 添加框架

      时间:2023-05-17
            <bdo id='ZhAwl'></bdo><ul id='ZhAwl'></ul>

            <tfoot id='ZhAwl'></tfoot>

          • <legend id='ZhAwl'><style id='ZhAwl'><dir id='ZhAwl'><q id='ZhAwl'></q></dir></style></legend>
          • <i id='ZhAwl'><tr id='ZhAwl'><dt id='ZhAwl'><q id='ZhAwl'><span id='ZhAwl'><b id='ZhAwl'><form id='ZhAwl'><ins id='ZhAwl'></ins><ul id='ZhAwl'></ul><sub id='ZhAwl'></sub></form><legend id='ZhAwl'></legend><bdo id='ZhAwl'><pre id='ZhAwl'><center id='ZhAwl'></center></pre></bdo></b><th id='ZhAwl'></th></span></q></dt></tr></i><div id='ZhAwl'><tfoot id='ZhAwl'></tfoot><dl id='ZhAwl'><fieldset id='ZhAwl'></fieldset></dl></div>

            1. <small id='ZhAwl'></small><noframes id='ZhAwl'>

                  <tbody id='ZhAwl'></tbody>
                本文介绍了向 XCode 4 添加框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                当然,我在发布我的问题之前进行了研究.

                of course i did research before posting my question.

                我看过
                如何添加现有框架"在 Xcode 4 中?
                在 Xcode 4 中添加框架
                在 Xcode 4 中添加 OpenGL 框架
                XCode 4 添加 dylib

                但整个事情都变得错误了.

                but whole thing is becoming wrong.

                我的目标:将(CorePlot)框架添加到 XCode Mac 项目(不是 iPhone)

                My goal: Add (CorePlot) framework to XCode Mac project (not an iPhone one)

                我的环境:OSX Lion 10.7、SDK Lion、XCode 4.1 (4B110)

                My environment: OSX Lion 10.7, SDK Lion, XCode 4.1 (4B110)

                我的步骤:

                • 打开 XCode,新建项目
                • 将 CorePlot 下载到我的库目录(如 ~/Applications/LIBS)
                • 打开的项目首选项,通过 (+) 打开的对话框添加框架
                • 添加现有框架(+ 如果需要,将文件复制到目标组)
                • 选择的目录是 ~/Applications/LIBS/CorePlot/Binaries/MacOS/CorePlot.framework/
                • 框架组的 DnD CorePlot
                • 将 CorePlot 添加到 Build Phases >将二进制文件与库链接

                然后运行我的项目

                我得到的是这个错误信息:

                what I got is this error message:

                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
                

                事实上,当我查看给定目录(应用程序包)时,没有目录Frameworks,因此链接无法成功

                And in fact, when I looked into given directory (app bundle) there was no directory Frameworks and so the linking cannot be successful

                我又搜索了一个,发现我可以创建 Build Rule 并通过一些脚本将文件复制到最终的二进制包中,但这是唯一的方法吗?

                I have searched one more, and found, that I can create Build Rule and copy files into final binary bundle via some script, but is this only way how to do this?

                是否有一些选项可以打开/关闭将链接的框架复制到最终包?

                Isn't there some option to just turn on/off copying linked frameworks to final bundle?

                请注意,CorePlot 目标.framework"的 Dynamic Library Install Name 设置为 @loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot,所以它在最终的二进制包中寻找正确的位置

                Note that CorePlot target '.framework' has Dynamic Library Install Name set to @loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot, so it is looking in right place in final binary bundle

                推荐答案

                通过添加现有框架"添加框架后

                After adding framework via "Add existing framework"

                • 转到项目设置 > 构建阶段
                • 在右下角点击Add buid phase > Copy Files
                • 选择目标 > 框架
                • 将框架拖放到文件列表中

                就是这样.

                这篇关于向 XCode 4 添加框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:安装自定义可可框架的最佳方法 下一篇:如何在不创建 Umbrella 框架的情况下构建一个依赖于另一个框架的 iOS 框架

                相关文章

                • <bdo id='ufokb'></bdo><ul id='ufokb'></ul>

                <small id='ufokb'></small><noframes id='ufokb'>

              • <i id='ufokb'><tr id='ufokb'><dt id='ufokb'><q id='ufokb'><span id='ufokb'><b id='ufokb'><form id='ufokb'><ins id='ufokb'></ins><ul id='ufokb'></ul><sub id='ufokb'></sub></form><legend id='ufokb'></legend><bdo id='ufokb'><pre id='ufokb'><center id='ufokb'></center></pre></bdo></b><th id='ufokb'></th></span></q></dt></tr></i><div id='ufokb'><tfoot id='ufokb'></tfoot><dl id='ufokb'><fieldset id='ufokb'></fieldset></dl></div>

                  1. <legend id='ufokb'><style id='ufokb'><dir id='ufokb'><q id='ufokb'></q></dir></style></legend>
                  2. <tfoot id='ufokb'></tfoot>