0

I installed msgpack with brew and can compile the sample code with gcc msgpacktest.c -lmsgpack in the command line. But when I add the header in test.m, a class in my iOS project and add -lmsgpack in Compile Sources of Build Phases, I still get the error msgpack.h file not found. I am a new programmer and this is confusing me. What am I missing?

user299648
  • 2,769
  • 6
  • 34
  • 43

1 Answers1

0

You need to tell Xcode where to find the header. In Build Settings, under Search Paths, add the path under User Header Search Paths.

RishiG
  • 2,790
  • 1
  • 14
  • 27
  • I now add /usr/local/Cellar/msgpack/0.5.7 to my Header Search Paths, but I am still getting the same error. – user299648 Nov 20 '13 at 19:05
  • Did you add it under Header Search Paths, or User Header Search Paths? Try setting Always Search User Paths to YES. Also, sometimes things don't take effect until you quit and restart Xcode. – RishiG Nov 20 '13 at 19:28