GPUImage框架_文檔翻譯_02

“咳咳.......” ?CC 又上線了哦!今天花30分鐘把剩下的文檔介紹翻譯一下!不喜勿噴!不過可以指出CC的錯誤之處哦!留言或者私信給我都可以哦~~~~ CC看到會及時更正的哦!

Adding the static library to your iOS project(添加靜態(tài)庫到iOS項目中)

Note: if you want to use this in a Swift project, you need to use the steps in the "Adding this as a framework" section instead of the following. Swift needs modules for third-party code.

(注意:如果你現(xiàn)在將CPUImage使用在Swift 項目,你需要使用“Adding this as a framework”這章的步驟。Swift需要使用第三方代碼)

Once you have the latest source code for the framework, it's fairly straightforward to add it to your application. Start by dragging the GPUImage.xcodeproj file into your application's Xcode project to embed the framework in your project. Next, go to your application's target and add GPUImage as a Target Dependency. Finally, you'll want to drag the libGPUImage.a library from the GPUImage framework's Products folder to the Link Binary With Libraries build phase in your application's target.

一旦你有了框架的最新源代碼,將其添加到應用程序中就相當簡單了。首先拖動GPUImage.xcodeproj到你的應用程序的Xcode項目嵌入框架在你的項目中。接下來,去你的應用程序的目標和添加GPUImage作為Target的依賴。最后,你要把libGPUImage.a靜態(tài)庫。添加到從GPUImage框架的產(chǎn)品Link Binary With Libraries build phase在你的項目中。

GPUImage needs a few other frameworks to be linked into your application, so you'll need to add the following as linked libraries in your application target:

GPUImage需要一些其他的框架被連接到你的應用程序,所以您需要添加以下鏈接庫應用程序中的目標

1.CoreMedia

2.CoreVideo

3.OpenGLES

4.AVFoundation

5.QuartzCore

You'll also need to find the framework headers, so within your project's build settings set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the GPUImage source directory. Make this header search path recursive.

你還需要找到框架的頭文件,所以在項目GPUImage源目錄應用程序的生成設置頭文件搜索路徑的framework/ subdirectory。使這個頭文件搜索路徑遞歸。

To use the GPUImage classes within your application, simply include the core framework header using the following:

在你的應用中使用GPUImage類,僅包括使用以下核心框架頭文件:

#import "GPUImage.h"

As a note: if you run into the error "Unknown class GPUImageView in Interface Builder" or the like when trying to build an interface with Interface Builder, you may need to add -ObjC to your Other Linker Flags in your project's build settings.

作為一個提示:如果你遇到錯誤“Unknown class GPUImageView in Interface Builde(未知類GPUImageView在界面生成”或類似于試圖用界面生成器生成界面,您可能需要add -ObjC to your Other Linker Flags在項目的生成設置中。

Also, if you need to deploy this to iOS 4.x, it appears that the current version of Xcode (4.3) requires that you weak-link the Core Video framework in your final application or you see crashes with the message "Symbol not found: _CVOpenGLESTextureCacheCreate" when you create an archive for upload to the App Store or for ad hoc distribution. To do this, go to your project's Build Phases tab, expand the Link Binary With Libraries group, and find CoreVideo.framework in the list. Change the setting for it in the far right of the list from Required to Optional.

另外,如果你需要部署到iOS 4.X系統(tǒng),看來,Xcode的當前版本(4.3)要求你weak-link的Core Video框架,最終的應用程序或您看到崩潰日志“Symbol not found: _CVOpenGLESTextureCacheCreate:“當你創(chuàng)建上傳到App Store或廣告組織分布的檔案。要做到這一點,去你的項目Build Phases tab,擴大the Link Binary With Libraries group,并在列表中找到CoreVideo.framework。在列表右側(cè)的設置將必選修改為可選

Additionally, this is an ARC-enabled framework, so if you want to use this within a manual reference counted application targeting iOS 4.x, you'll need to add -fobjc-arc to your Other Linker Flags as well.

此外,這是一個ARC-enabled框架,所以如果你想用這個在手動引用計數(shù)的應用針對iOS 4。X,你需要add -fobjc-arc在你其他的鏈接標志中。

Building a static library at the command line(在命令行中構(gòu)建靜態(tài)庫)

If you don't want to include the project as a dependency in your application's Xcode project, you can build a universal static library for the iOS Simulator or device. To do this, runbuild.shat the command line. The resulting library and header files will be located atbuild/Release-iphone. You may also change the version of the iOS SDK by changing theIOSSDK_VERvariable inbuild.sh(all available versions can be found usingxcodebuild -showsdks).

如果你不想引入的項目作為依賴在你的應用的Xcode項目中,您可以為iOS模擬器或設備建立一個通用的靜態(tài)庫。要做到這一點,在命令行runbuild.shat。生成的庫和頭文件將位于atbuild/Release-iphone中。你也可以通過改變build.sh的IOSSDK_VER變量改變iOS SDK版本(所有可用的版本可以找到并使用xcodebuild - showsdks)

今天的翻譯時間結(jié)束哦!30分鐘到了~~~So!我又要準備新課題去咯~~~????

小伙伴們閱讀后,請喜歡一下。文章更新可以提醒到你哦~~~~


我是CC ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?QQ號:1776094879

喜歡手動點個喜歡吧!

可以持續(xù)關(guān)注CC老師哦!留言你想學習的課題,我就會給你寫一個專題哦!

當然,你也可以給日以繼夜,明明可以靠臉卻非得靠實力的CC老師打賞一個!??!給CC老師打賞個面膜錢吧!

關(guān)注CC,特立獨行的女開發(fā)-> 講師。把自己的熱血、灑脫、文藝青年的心灑滿課堂;不甘心當講師,致力成為網(wǎng)紅;寫的了代碼,耍的了“流氓”的 CC老師

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容