Search code examples
iospspdfkitpstcollectionview

Linker error compiling PDFKit


I am trying to integrate PSPDFKit for iOS in my project and I have not been yet able to success. After downloading the Demo version, adding the framework to my project, adding all the required libraries and placing

#import <PSPDFKit/PSPDFKit.h>

on the 'prefix' file, I get an linker error:

ld: section __objc_const (address=0x00613EA8, size=4651232504) would make the output executable exceed available address range for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

NOTE: My project uses PSTCollectionView and I have successfully compiled PSPDFKit on a test project (created only for that effect).

I would really appreciate any help. Thanks in advance.


Solution

  • As far as I understand it, this is a bug in Apple's compiler/linker chain. Please file a radar at radar.apple.com with your failing project. A workaround is to use the source code as a subproject instead of the precompiled binary.

    As soon as I can get my hands on such a project, I can experiment with the settings to see if there's any workaround. Seems to only happen under very specific combinations with other 3rd party code.