GPUImage.h File Not Found 1

Looking at my analytics for the last week reveals something a bit strange. One of the most popular search phrases bringing people to the site is GPUImage.h File Not Found.

I’m guessing that this means that a lot of people are having a problem setting up a project to use GPUImage. So, here’s what you probably need to do.

If you are having this problem and the following instructions don’t solve the problem, contact me so that I can help you (and include that information in the post for posterity).

You can read the README on the github page or read Brad Larson’s answer to the question on stackoverflow.com. But, if you are still baffled, here’s what I do.

The most likely culprit for this error is that you haven’t included the path to the GPUImage.h file in the ‘Header Search Paths’ variable. Go to the ‘Build Settings’ tab by clicking on the project container at the top right of the file navigator here:

Select the target for your project, then select the ‘Build Settings’ tab. Navigate or type into the search field, ‘Header Search Paths’. Find that line in the settings and add a reference to your GPUImage project path. You can either type it in as you see below, or type in the path, and select the recursive option on the right and it will add the ** for you. Recursive means that it searches in all the subdirectories as well as the root.

It should now work for you. But, if you are still having problems, some other issues (these shouldn’t result in the ‘GPUImage.h file not found’ error, but are things you need to do before you can get GPUImage working). All this is in the README.

You need to include a number of frameworks to your project, including AVFoundation, OpenGLES, CoreVideo, CoreMedia, and QuartzCore. You need to add the GPUImage.a to both the ‘Link Binaries with Libraries’ section and the ‘Target Dependencies’ section.

You need to add the -ObjC string to the build setting called ‘Other Linker Flags’.

If this still isn’t solving your problem, reach out to me and I’ll see if I can help you. Either post a comment or send me an IM on twitter @fattjake.

One comment on “GPUImage.h File Not Found

  1. Reply axa901 May 6,2013 10:05 pm

    Hi there,

    I am trying to insert GPUIMage framework in my code and running into several issues. Your post helped me solve one problem but now I am getting another error.

    Undefined symbols for architecture armv7:
    “_CATransform3DIdentity”, referenced from:
    -[GPUImageTransformFilter init] in libGPUImage.a(GPUImageTransformFilter.o)
    “_CATransform3DGetAffineTransform”, referenced from:
    -[GPUImageTransformFilter affineTransform] in libGPUImage.a(GPUImageTransformFilter.o)
    “_CATransform3DMakeAffineTransform”, referenced from:
    -[GPUImageTransformFilter setAffineTransform:] in libGPUImage.a(GPUImageTransformFilter.o)
    “_OBJC_CLASS_$_CAEAGLLayer”, referenced from:
    objc-class-ref in libGPUImage.a(GPUImageView.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Could you please provide some help what may be wrong with my code…

    Thanks,
    A

Leave a Reply