• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 319, comments - 22, trackbacks - 0, articles - 11
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            @executable path, @load path and @rpath

            Posted on 2012-04-18 06:14 RTY 閱讀(1492) 評論(0)  編輯 收藏 引用 所屬分類: 編程常識Mac osLinux

            @executable path, @load path and @rpath

            2010年11月6日 by Wincent Colaiuta

            Note: this article is actually about the @executable_path, @load_path and @rpath install paths used by the linker on Mac OS X; wiki titles can't include underscores, however, because they are ambiguous with spaces.

            Absolute paths

            Useful for frameworks installed in shared locations. Example:

            • Install path: /Library/Frameworks/Foo.framework/Versions/A/Foo

            @executable_path

            Useful for frameworks embedded inside applications, because it allows you to specify the location of the framework relative to the application's executable:

            • Install path: @executable_path/../Frameworks/Foo.framework/Versions/A/Foo
            • Application location: /Applications/Foo.app
            • Executable path: /Applications/Foo.app/Contents/MacOS
            • Framework location: /Applications/Foo.app/Contents/Frameworks/Foo.framework
            • Linker puts all this together to figure out that the framework binary can be found at: /Applications/Foo.app/Contents/MacOS/../Frameworks/Foo.framework/Versions/A/Foo

            @loader_path

            Available from Mac OS X 10.4 Tiger onwards; useful for frameworks embedded inside plug-ins, because it allows you to specify the location of the framework relative to the plug-in's code (remember, plug-ins may not actually know where they are going to be installed, relative to the application, so knowing @executable_path doesn't help us in this case):

            • Install path: @loader_path/../Frameworks/Foo.framework/Versions/A/Foo
            • Application location: /Applications/Foo.app
            • Plug-in location: /Library/Application Support/Foo/Plug-Ins/Bar.bundle
            • Executable path: /Applications/Foo.app/Contents/MacOS
            • Loader path: /Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/MacOS
            • Framework location: /Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/Frameworks/Foo.framework
            • Linker puts all this together to figure out that the framework binary can be found at: /Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/MacOS/../Frameworks/Foo.framework/Versions/A/Foo

            Note that if the "loader" is an application rather than a plug-in, the @loader_path ends up being equivalent to @executable_path.

            @rpath

            New in Mac OS X 10.5 Leopard is @rpath. Key points:

            • @rpath instructs the dynamic linker to search a list of paths in order to locate the framework
            • critically, this list is embedded in the loading application
            • this means that a single framework with @rpath/Foo.framework/Versions/A/Foo can be made to work in a number of different ways; that is, you are effectively no longer limited by the choice of specifying your "install path" using either @executable_path or @loader_path
            • the down side: you now have to pass additional linker flags when building the host application (eg. -rpath @executable_path/../Frameworks or /Library/Frameworks; note that specifying both will cause the dynamic linker to try looking in both locations)

            Sources

            国产精品热久久无码av| 久久久久国产精品人妻| 色综合久久综合网观看| 国产99久久九九精品无码| 久久涩综合| 久久亚洲AV成人出白浆无码国产 | 久久夜色撩人精品国产| 人妻系列无码专区久久五月天| 色老头网站久久网| 久久99国产精品一区二区| 欧美精品丝袜久久久中文字幕 | 97久久综合精品久久久综合| 色偷偷888欧美精品久久久| 亚洲国产婷婷香蕉久久久久久| 久久亚洲精品成人av无码网站| 久久久精品国产亚洲成人满18免费网站 | 欧美粉嫩小泬久久久久久久 | 99精品久久久久久久婷婷| 2020最新久久久视精品爱| 亚洲av日韩精品久久久久久a| 久久精品国产亚洲综合色| 亚洲精品乱码久久久久久久久久久久 | 久久久久亚洲AV成人片| 亚洲国产成人乱码精品女人久久久不卡 | av国内精品久久久久影院 | 久久青草国产精品一区| 久久午夜夜伦鲁鲁片免费无码影视| 97久久超碰国产精品旧版| 亚洲精品国精品久久99热一| 亚洲国产精品无码久久九九| 久久久久久久综合日本亚洲| 久久婷婷五月综合97色| 亚洲va中文字幕无码久久| 亚洲中文字幕久久精品无码喷水| 亚州日韩精品专区久久久| 久久久久噜噜噜亚洲熟女综合| 91精品国产综合久久四虎久久无码一级| WWW婷婷AV久久久影片| 99久久成人国产精品免费 | 久久久久亚洲av无码专区导航| 无码AV波多野结衣久久|