1

I am having a problem with libTools.a when following the PDFTron BLOG article, step 2: getting-started-on-ios

Step 1, works. I have a working PDF viewer, but no controls other then paging and zooming.

When I add the libTools.a library (the one that came in the SDK, or the one I built using Tools.xcodeproj, I receive the following error for every platform I try (simulator, ipad2, iphone6 - architecture name changes for each):

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_DraggableCollectionViewFlowLayout", referenced from: objc-class-ref in libTools.a(ThumbnailsViewController.o) ld: symbol(s) not found for architecture x86_64

The sample code is working fine. So it's my implementation in our application.

The rest of the project's 3rd party frameworks are managed with CocoaPods.

There has got to be something simple I am overlooking... Ideas?

Kent
  • 1,374
  • 1
  • 15
  • 29

2 Answers2

1

Judging by the error message, it sounds like you may need to add /Lib/src/PDFViewCtrlTools/ThirdParty/DraggableCollectionView into your project. This is required for the ThumbnailsViewController.

  • Fixed the problem. Thank you. Now it seems I have duplicate symbols: libTools.a(OutlineViewController.o) and FastPdfKit(FastPdfKit) - not a problem with PDFTron - I'll test without FastPdfKit in the app. – Kent May 04 '15 at 20:04
  • Does this solution work for everyone? I tried this but it failed – Raditya Kurnianto Sep 22 '15 at 09:58
0

It seems it doesn't find class for the Simulator on 64bit platform.

You can try to modify setting in <your target>/Build settings/Architectures/only active arch and set it to NO (it is YES by default in Debug) to be sure all platforms are build, even in Debug mode.

Nicolas Buquet
  • 3,880
  • 28
  • 28
  • Build settings/Architectures/only active arch is set to NO. The function does not appear to be compiled into the library. – Kent May 04 '15 at 19:49