6

I'm new in iOS development, and met this library linking problem in last few days.

I was trying to use GMGridView in a project, but cannot make it working.

This project is shipped as static library, so I just drag the xcodeproj file in my project. Then I added libGMGridView.a in Link Binary With Libraries, GMGridView in Target Dependencies. I also added the path in Header Search Paths.

However, Xcode still report .h file not found error when I tried to import GMGridView.h.

Could anyone give me a hand on this? Thanks in advance!

Michael Dautermann
  • 87,822
  • 17
  • 159
  • 205
Selkie
  • 1,774
  • 1
  • 14
  • 20

1 Answers1

17

Had the same issue!!! Made it work!!!! soooooooo:

  1. copy GMGridView folder from https://github.com/gmoledina/GMGridView to your project dir
  2. in xcode right click on any file group and choose add files
  3. find GMGridView folder in your folder dir and choose GMGridView.xcodeproj - (dont copy, create groups not folders, add targets)
  4. go to your project targets - search - HEADER_SEARCH_PATHS add- GMGridView/**
  5. select Building phases in settings - choose target dependencies and add GMGridView
  6. select Building phases in settings - link binary libraries and add libGMGridView.a

import should be:

#import "GMGridView.h"
#import <QuartzCore/QuartzCore.h>
John Riselvato
  • 12,689
  • 5
  • 61
  • 88
Tim Kozak
  • 3,538
  • 36
  • 39