Search code examples
iosobjective-cxcode64-bitgpuimage

How to enable 64-bit support with GPUImage


When building app with GPUImage, I got errors like this

ld: warning: directory not found for option '-L/Users/.../GPUImage'
ld: warning: ignoring file /Users/.../Libraries/GPUImage/libGPUImage.a, missing required architecture x86_64 in file /Users/.../Libraries/GPUImage/libGPUImage.a (3 slices)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GPUImageCrosshatchFilter", referenced from:
      objc-class-ref in AddPopViewController.o

I don't know if this error is related, but what I want to do is for my app to support 64-bit processors. How can I do that? In this link, it says

The framework supports 64-bit, but you'll have to enable this for your project in the framework and your application yourself

How do I do this? Thanks


Solution

  • Following are the steps given in the iOS documentation to ensure the app supports 64 bit. Check if the following points are taken care in your environment.

    At a high level, here are the steps to create an app that targets both the 32-bit and the 64-bit runtime environments:

    1. Install the latest Xcode.
    2. Open your project. Xcode prompts you to modernize your project. Modernizing the project adds new warnings and errors that are important when compiling your app for 64-bit.
    3. Update your project settings to support iOS 5.1.1 or later. You can’t build a 64-bit project if it targets an iOS version earlier than iOS 5.1.
    4. Change the Architectures build setting in your project to "Standard Architectures (including 64-bit)."
    5. Update your app to support the 64-bit runtime environment. The new compiler warnings and errors will help guide you through this process. However, the compiler doesn’t do all of the work for you; use the information in this document to help guide you through investigating your own code.
    6. Test your app on actual 64-bit hardware. iOS Simulator can also be helpful during development, but some changes, such as the function calling conventions, are visible only when your app is running on a device.