13

I am developing iPhone application using iOS. I need to add GPUImage framework, i followed this url for adding purpose. http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework

Now i drag and drop GPUImage xcodeproject file in my project. In this project product folder having libGPImage.a file. It showing empty folder, in this file missing. It showing like red color. I am unable to access GPUImage class files. why it is happening.

Thanks,

iSara
  • 919
  • 3
  • 10
  • 24
  • 8
    I nominate to reopen this, as the GPUImage framework is an extremely useful tool for ios opengl development. This question saved me quite a bit of time. – mmr Jan 03 '13 at 04:52
  • 1
    how do I vote down on that "closed as too localized" message?? – Hlung Jan 11 '13 at 09:07
  • here are some Swift 5 visual instructions: https://stackoverflow.com/a/63200120/4833705 – Lance Samaria Aug 01 '20 at 09:16

4 Answers4

16

As others have commented, I have step-by-step instructions for framework installation on the main GitHub page. I'll reproduce those below:

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 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:

  • CoreMedia
  • CoreVideo
  • OpenGLES
  • AVFoundation
  • 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.

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

#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.

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.

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.

If you follow the steps in the first paragraph, when you drag the libGPUImage.a library from the Products folder into the Link Binary With Libraries build stage, it will indeed show up as red. The reason for this is that the static library has not been built yet at this stage. Don't worry about that, because if you follow the previous step of adding the project as a dependency of your application the static library will be built before your application is. Everything should work fine from this point on.

These are the installation instructions I've now used on several applications, and they've worked for each one.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
1

Try this

projet Target > summary > framwork > add Others.> than browser to "BradLarson-GPUImage-6619cd2/framework>GPUImage.xcodeproj" .

kulss
  • 2,057
  • 1
  • 14
  • 16
  • yes, i did that. I am asked, if i added GPUImage.xcodeprject external framework file to my iPhone project here some file missing. In product folder libGPUImage.a this file missing. – iSara Jun 28 '12 at 11:12
  • if some files are not included than u can manually add to ur project build phase by drags file from project navigator On in left side to build phase. To reach build Phase use this path :- project target > build Phases > Compile Source > add file – kulss Oct 31 '12 at 04:59
0

Thi url you provided is not working... anyways, did you try to add *.a file into your project by adding it in the build settings of your target?

Obaid Maroof
  • 1,523
  • 2
  • 19
  • 40
0

You need to follow instruction to add Framework in your project, you can check those under "Adding the framework to your iOS project" section in- https://github.com/BradLarson/GPUImage

rishi
  • 11,779
  • 4
  • 40
  • 59