GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage

Open Thavasidurai opened this issue 8 years ago • 6 comments

Hi Brad,

I am trying to integrate GPUImage with my new project and I exactly followed whatever instruction given in the "Adding this as a framework (module) to your Mac or iOS project" section but its not working for me. I am not sure what I am missing here, I googled and tried so many things but nothing is helped me . Can you please guide me how to solve this?

Error dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage Referenced from: /var/containers/Bundle/Application/A14E6ED5-99C3-480F-B2A3-3646F83F682C/ImageFilter.app/ImageFilter Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/A14E6ED5-99C3-480F-B2A3-3646F83F682C/ImageFilter.app/Frameworks/GPUImage.framework/GPUImage: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/A14E6ED5-99C3-480F-B2A3-3646F83F682C/ImageFilter.app/Frameworks/GPUImage.framework/GPUImage'

Additional Notes I've added the GPUImage.framework to both the Target Dependencies and the Link Binary with Libraries sections, as well as adding a Copy Files section to copy the GPUImage framework and also I set destination to Frameworks

Thavasidurai avatar Jun 21 '16 14:06 Thavasidurai

Verify that the framework is actually ending up in the Frameworks directory in the app bundle. Run a full clean and then build from scratch, because sometimes old builds of frameworks can get out of sync (particularly if you're switching Xcode versions).

BradLarson avatar Jun 21 '16 14:06 BradLarson

Sorry Brad, I am not able to verify the framework whether its ending up in the Frameworks directory or not. Can you please help me? how to verify it when I am building the app in iPhone device. I am not able to access the path /private/var/containers/Bundle/Application....

Thavasidurai avatar Jun 26 '16 10:06 Thavasidurai

Go to the DerivedData location where the application build result is output. View the contents of the application bundle, and go to the Frameworks directory. Look for GPUImage.framework in there.

Also, make sure you're not trying to deploy this on a device running anything below iOS 8.0, as older OS versions don't support dynamic libraries. You'd be warned about this during build, however.

BradLarson avatar Jun 27 '16 15:06 BradLarson

My solution for this issue was setting Embedded Content Contains Swift Code to YES in the build settings of the project's target.

screen shot 2016-06-29 at 18 53 40

eraydiler avatar Jun 29 '16 15:06 eraydiler

I try to add GPUImage.framework to embedded binary and work like a charm

firhat avatar Dec 24 '17 04:12 firhat

Adding to @firhat's response, for the latest version of Xcode, don't do any of the other steps mentioned in the readme, such as adding the GPUImage.framework in all the build phases. Simply add GPUImage.framework to the Embedded Binaries under your project's General settings, and Xcode seems to take care of the rest.

phildow avatar Jul 22 '19 20:07 phildow